Solved

Accepting dial-in with PAP

Posted on 1997-09-08
1
249 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
1 Comment
 
LVL 4

Accepted Solution

by:
unicorntech earned 50 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now