Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux Dial-in server (ppp) Experts Called for

Posted on 2002-04-23
14
Medium Priority
?
851 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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
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
 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month8 days, 19 hours left to enroll

876 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