Solved

Accepting dial-in with PAP

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

789 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