Solved

Accepting dial-in with PAP

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Searching File Names and Eliminating Duplicates in Linux 4 64
Edit linux file using python 4 40
linux boot fsck problem 3 61
a free alternative to cpanel? 1 58
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
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.

920 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

15 Experts available now in Live!

Get 1:1 Help Now