Solved

Linux Dial-in server (ppp) Experts Called for

Posted on 2002-04-23
14
817 Views
Last Modified: 2013-12-15
Hello sir ,
           I wanted to use  the linux redhat 6.2 as the dial in server , i have done the following things :

in the /etc/inittab
S0:2345:respawn:/sbin/mgetty -D ttyS0

mgetty is installed and my dev is ttyS0.

also created the user with login test & passwd test . in the /etc/ppp/options file it is :
lock
-detach
modem
crtscts
proxyarp
asyncmap 0

also in the options.ttyS0
ipofserver:ipofclient


Then when i dial from my windows machine ( via dial up networking )  , it dials the linux machine modem then nothing does . I just cannot understand what is happening .


Please Help.

           
0
Comment
Question by:raghvendra
  • 5
  • 3
  • 2
  • +2
14 Comments
 
LVL 4

Expert Comment

by:MFCRich
ID: 6963592
Did you setup the '/etc/mgetty-sendfax/login.conf' file?

The file is commented so you can use it as a reference.
0
 

Author Comment

by:raghvendra
ID: 6964628
Hello MFCrich ,
only last line is uncommented in the login.conf file

*       -       -       /bin/login @
0
 
LVL 4

Expert Comment

by:MFCRich
ID: 6966270
There is a line (commented out) that starts "/AutoPPP/". This will have to be uncommented but read the comments that preceed it and man pppd to ensure its configured the way you want.
0
 
LVL 4

Expert Comment

by:MFCRich
ID: 6966274
Also you need the full path to the device in inittab:

S0:2345:respawn:/sbin/mgetty -D /dev/ttyS0

0
 

Author Comment

by:raghvendra
ID: 6971114
Hello MFCRich ,

                 Yes the path was /dev/ttyS0 as you have told , now i got to tell you one intresting thing when we rarely got the connection then the log at the /vat/log/mgetty.log.ttyS0 tells like this

--
04/26 18:10:01 yS0  mgetty: experimental test release 1.1.14-Apr02
04/26 18:11:34 ##### data dev=ttyS0, pid=778, caller='none', conn='38400', name='', cmd='/bin/lo
gin', user='test'    



but when the connection is not made then it tells

--
04/26 18:08:48 yS0  mgetty: experimental test release 1.1.14-Apr02
04/26 18:10:01 ##### failed A_FAIL dev=ttyS0, pid=771, caller='none', conn='', name=''

--


Please Help what does it mean ???
0
 

Author Comment

by:raghvendra
ID: 6971192
hello ,
 
       when the user login into the ppp server and types the ppp ( where the ppp is the alias of the pppd ) then the log says


04/26 18:39:19 yS0  mgetty: experimental test release 1.1.14-Apr02
04/26 18:40:15 yS0  clean_line: only 500 of 10000 bytes logged
04/26 18:40:15 yS0  clean_line: got too much junk (dev=ttyS0).: Operation not permitted
04/26 18:40:15 ##### data dev=ttyS0, pid=966, caller='none', conn='38400', name='', cmd='/bin/login', user='Gz(N9P_.Bs@8pc$^`Y]i'R{&r{vB'  
0
 

Author Comment

by:raghvendra
ID: 6971193
hello ,
 
       when the user login into the ppp server and types the ppp ( where the ppp is the alias of the pppd ) then the log says


04/26 18:39:19 yS0  mgetty: experimental test release 1.1.14-Apr02
04/26 18:40:15 yS0  clean_line: only 500 of 10000 bytes logged
04/26 18:40:15 yS0  clean_line: got too much junk (dev=ttyS0).: Operation not permitted
04/26 18:40:15 ##### data dev=ttyS0, pid=966, caller='none', conn='38400', name='', cmd='/bin/login', user='Gz(N9P_.Bs@8pc$^`Y]i'R{&r{vB'  
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 3

Expert Comment

by:hnminh
ID: 6991476
With this configuration, your client will have to open the terminal windows after modem handshaking, typing username and password to get to shell promt then call pppd to start ppp session. These steps could be done automatically by using script at client side. You can test it yourself!

If you want to use PAP for authentication, the normal and modern way, your options file should be like this:

--------
# configure modem on COM1 for incoming call
lock
/dev/ttyS0
crtstcts
modem

# Specified client IP address. If your network is 192.168.1.x and 192.168.1.100 is available
:192.168.1.100
nodefaultroute
# making PPP client end to be on the same segment as eth0
proxyarp
# Using /etc/passwd database for authentication...
login
# ... via PAP
require-pap

# provide other information for your Windows client like DNS, WINS, etc...
# Assume that DNS and WINS is at 192.168.1.1
ms-dns 192.168.1.1
ms-wins 192.168.1.1
-------------

add pppd in your local.rc so that it will start everytime the server bootup.

If you want to serve on more than 1 COM port, you should remove "/dev/ttySx" in the /etc/ppp/options file, create new "/etc/ppp/options.ttySx", add 1 line

--------
:192.168.1.y
--------

to specified the IP will be provided to client when connected to this port. Then modify the pppd in your local.rc file to "/usr/sbin/pppd /dev/ttySx" where x is the COM port number you want to use. How many port will be, you will need that many pppd startup line for each port.

Hope it help!
0
 
LVL 3

Expert Comment

by:hnminh
ID: 6991485
oh.... and dont forget to remove/comment out the line

---------
S0:2345:respawn:/sbin/mgetty -D ttyS0
---------

in inittab file. This line is only be used when to want to access to linux box through terminal software (like Hyper Terminal) connected using crossed serial cable
0
 

Author Comment

by:raghvendra
ID: 6992870
hello ,
       hnminh

     
             I cannot understand the following lines , also as you have told that start the pppd via rc.local file then should client also start the pppd when it gets the terminal window ??

Also please clear me the following line as my dial in server is linux and client is windows . also please tell me whether i should connect with hyperterm or dial up networking .

                     oh.... and dont forget to remove/comment out the line

                     ---------
                     S0:2345:respawn:/sbin/mgetty -D ttyS0
                     ---------

                     in inittab file. This line is only be used when to want to access to linux box through terminal software
                     (like Hyper Terminal) connected using crossed serial cable
0
 

Expert Comment

by:ctwos
ID: 7074691
#if < 7.3 update w/ppp-2.4.1-3.i386.rpm

adduser [--help] (shell only need if dialup telnet also)
chmod u+s /usr/sbin/pppd

ADD or MODIFY to [path]:

[/etc/inittab]:
#ttyS2 COM3 IRQ5
S2:2345:respawn:/sbin/mgetty ttyS2 -D /dev/ttyS2

[/etc/ppp/options]:
#192.168.0.10 is IP of server
#192.198.0.20 is IP given to host
#192.168.0.1  is IP of gateway / nameserver
lock
auth
login
modem
crtscts
proxyarp
ktune
idle 800
holdoff 200
maxconnect 3200
192.168.0.10:192.168.0.20
ms-dns 192.168.0.1

[/etc/ppp/pap-secrets]:
# Secrets for authentication using PAP
# client        server          secret          IP addresses
accountName     *          "password"     *

[/etc/mgetty+sendfax/login.config]:
/AutoPPP/ -     a_ppp   /usr/sbin/pppd auth -chap +pap login

[/etc/mgetty+sendfax/mgetty.config]:
rings 2
#debug 4
#fax-id 49 115 xxxxxxxx

[/etc/sysconfig/ipchains]:
#if = 7.x
-A input -s 0/0 -d 0/0 -i ppp0 -j ACCEPT

[/etc/modules.conf]:
#if = 7.3
alias ppp-compress-21 slhc

#    *** IN M$WINDOWS ***
Under Server Types check:
Enable software compression
TCP/IP

TCP/IP settings check:
Server assigned IP address
Server assigned name server address

All other unchecked.
0
 

Expert Comment

by:ctwos
ID: 7074697
NOTE line must be 1st line (add to top).

[/etc/sysconfig/ipchains]:
#if = 7.x
-A input -s 0/0 -d 0/0 -i ppp0 -j ACCEPT



0
 

Expert Comment

by:SpideyMod
ID: 8275607
All,
I am unlocking this question in preparation for cleanup.  I will return in 7 days to finalize this question.  Please leave any recommendations for the final state of this question, I will take all recommendations into consideration.  Failing any feedback, I may decide in 7 days to delete or PAQ this question with no refund.  Thanks.

SpideyMod
Community Support Moderator @Experts Exchange
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8330066
PAQ'd

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

760 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

22 Experts available now in Live!

Get 1:1 Help Now