Solved

Accepting dial-in with PAP

Posted on 1997-09-08
1
272 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 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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

717 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