?
Solved

Accepting dial-in with PAP

Posted on 1997-09-08
1
Medium Priority
?
274 Views
Last Modified: 2013-12-15
Hello,
I am trying to get my linux 2.0.29 box to accept connections. How ever I´m having probs with finding docs that cover this topic.
I´d like to set up PAP (but I have no clue how). I also have not decided wether the linux box should assign the IP address to the win95 box dialing in, or weather I should pre specify the IP address in the settings of the dial up adapter.
The only thing I have managed so far is to connect the modem to /dev/ttyS0 and get it to pick up when some one calls.
But since nothing is set up yet there is no connection established.

Any advice would be greatly apreciated.
Thanks for your help...

Marcelo
0
Comment
Question by:sinner052397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
unicorntech earned 100 total points
ID: 1629726
Yes there is a way to do this and it's not too difficult.
If you go to /etc/innitab you will see some example configs for setting up agetty or uugetty or getty on your nominated serial line.

Then you will need to create a short awk script or similar to start ppp for the dial in user, eg-

#!/bin/bash
PPPHOSTS="/usr/local/etc/hosts.ppp
ETCHOSTS="/etc/hosts"

ttydev=`tty`
ttyid=`basename $ttydev`
ip=`awk -vTTY=$ttyid \
<Picture:    >'BEGIN {
<Picture:    >FS = +\t\t*"
<Picture:    >}
<Picture:    >{
<Picture:    >if ($1 == TTY) print $2
<Picture:    >} ' $PPPHOSTS`

if [ "$ip" = "" ]
then
<Picture:    >echo "ppp: can't assign IP address for this terminal port" 1>&2
<Picture:    >exit 1
fi

#Obtain local ip address

hostname=`hostname`
localip=`grep $hostname $ETCHOSTS | cut -d' ' -f1`

echo "ppp: connecting local ($localip) to remote ($ip)"
/usr/sbin/pppd modem ${localip}:${ip}
<Picture>

Calll this script ppp and make it executable for all.

Then throw this next file into /usr/local/etc/ and call it hosts.ppp-

#This file maps ip addresses to dial in ports

cua1 aaa.bbb.ccc.ddd

This file should start with the name of your dial in port ie cua1 is usually com2 on most boxes. Note that you must "TAB" to the next part of the file which is your ip address for that port.

Then try dialling in from your win95 machine using the "bring up terminal window after dialling" option in dial up networking. After it connectsa black post dial terminal screen will pop up asking for a login prompt. Enter the username and password for your ppp user and then type ppp at the shell prompt. This will initiate ppp and will start a ppp session between the two boxes.

If you need further advice please mail me at jasons@aone.com.au

Jason
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question