##################################################################################### # # my first implementaion of a ppp-server mini-HOWTO # # http://www.linux-consulting.com/PPP_Server/ppp_server.uhow2 # # 16-Sep-98 amo Date of release # ##################################################################################### you can use a variety of gettys... I use uugetty... To set up the modem to answer etc is a bit annoying: - see Serial-HOWTO - see PPP-HOWTO ( clients not much on ppp server ) - any other places for PPP server info ??? - see below for a micro-PPP-Server HOWTO -- hee hee hee Modem Setup Info ---------------- www.in.net/info/modems/index.html ftp://ftp.cc.gatech.edu/pub/people/gregh/modem-configs ( very old ) Modem FAQs: Navas 28800 Modem FAQ Curt's High Speed Modem Page Dialin Server Howto ------------------- http://www.swcp.com/~jgentry/pers.html http://alpha.greenie.net/mgetty/ mgetty uugetty PPP Server Howto ---------------- http://www.linux-consulting.com/PPP_Server ( this document ) http://www.swcp.com/~jgentry/pers.html http://euler.eipi.net/files/dialin.html Check for the files/directories: --- --- I assume your DNS is setup properly on the ppp server and clients --- /etc/hosts /etc/named.boot /etc/host.conf /etc/resolv.conf # # To setup the ppp server # ======================= # [root@ppp_server]# vi /etc/inittab # # use "init q" to reload changes # Check /var/log/messages for errors # # ------------------------------------- # Device Busy - Watch out for conflicts between minicom and uugetty # ------------------------------------- # S0:456:respawn:/sbin/uugetty ttyS0 57600 vt100 S1:456:respawn:/sbin/uugetty ttyS1 57600 vt100 # #x:456:respawn:/sbin/uugetty -d /etc/default/conf.uugetty.ttyS0 ttyS0 57600 vt100 # # other stuff.... # # end of file [root@ppp_server]# ls -l /etc/ppp -rw-r--r-- 1 root daemon 163 Aug 22 07:35 options -rw-r--r-- 1 root root 15 Aug 22 07:31 options.ttyS0 -- for each modem line -rw-r--r-- 1 root root 15 Aug 22 07:31 options.ttyS1 [root@ppp_server]# cat /etc/ppp/options # # Define IP# in /etc/ppp/options.ttyXX for each modem line # asyncmap 0 netmask 255.255.255.0 proxyarp lock crtscts modem # # end of file [root@ppp_server]# cat /etc/ppp/options.ttyS0 # PPP_Server2_IP#:ppp_client_0_IP# <<--- using dynamic IP# depending on modem connection [root@ppp_server2]# cat /etc/ppp/options.ttyS1 # PPP_Server2_IP#:ppp_client_1_IP# <<--- note IP# different for each modem # # donno if you need these.. # [root@ppp_server]# ls -l /etc/conf* lrwxrwxrwx 1 root root 18 Aug 22 06:02 /etc/conf.uugetty -> conf.uugetty.ttyS0 lrwxrwxrwx 1 root root 26 Jul 29 06:44 /etc/conf.uugetty.ttyS0 -> default/conf.uugetty.ttyS0 lrwxrwxrwx 1 root root 26 Jul 29 06:44 /etc/conf.uugetty.ttyS1 -> default/conf.uugetty.ttyS1 [root@ppp_server]# more /etc/default/conf.uugetty.ttyS0.xx # # 28-Jul-98 amo From Serial HowTo # # sample uugetty configuration file for a Hayes compatible modem to allow # incoming modem connections # # getty_ps.HOWTO # # SYSTEM=mysystem # VERSION=`/bin/uname -s -r` # ISSUE=/etc/issue # LOGIN=/bin/login # # alternate lock file to check... if this lock file exists, then uugetty is # restarted so that the modem is re-initialized # # NEEDED for locking with uucp and other programs using the modems # cua0 == ttyS0 # cua1 == ttyS1 # ALTLOCK=cua0 ALTLINE=cua0 # # line to initialize INITLINE=cua0 # # timeout to disconnect if idle... TIMEOUT=60 # # HANGUP=NO # # modem initialization string... # format: ... (chat sequence) INIT="" AT\r OK\r\n # # V.everything # # INIT="" \d+++\dAT\r OK\r\n ATH0\r OK\r\nAT&FB0X4&A0&C1&D2&M4&H1&K1&B1&R2S7=60S0=1\r OK\r --- --- this init string is a messy stuff... --- # # # waitfor string... if this sequence of characters is received over # the phone line, a call is detected WAITFOR=RING # this line is the connect chat sequence. This chat sequence is # performed after the WAITFOR string is found. The \A character # automatically sets the baudrate to the characters that are found, # so if you get the message CONNECT 2400, the baud rate is set to 2400 # # format: ... (chat sequence) CONNECT="" ATA\r CONNECT\s\A 56700 # # this line sets the time to delay before sending the login banner # WAITCHAR=NO DELAY=1 # DEBUG=010 # # end of file # # Initialize the modems # [root@ppp_server]# cat /etc/rc.d/rc.serial # # call this script from rc.local # # 56K modem /bin/setserial /dev/cua0 spd_vhi auto_irq autoconfig # # 28.8K modem /bin/setserial /dev/cua1 spd_hi auto_irq autoconfig # # Show parameters for these devices # /bin/setserial -abg /dev/cua? # # end of file # # Create a PPP account # vi /etc/passwd --- PPP_usr:some_passwd:1000+uid:ppp:PPP client login:/home/ppp:/etc/ppp/ppplogin ... usr:other_passwd:uid:gid:The User login:/home/usr:/bin/bash --- # # Test the modem answers # # 1. use the regular phone...and sse that uugetty picks up the phone call if not...check your modems and telephone number check that the modem is defined to answer ( s0=1 ) # # Before using minicom and seyon..be sure to disable uugetty as defined in /etc/inittab # comment out the uugetty lines and reload root# init q # 2. use minicom AND seyon to dialup the modem you should get a login prompt if not... you use minicom and seyon to call each other and check the registers -- go to some website for hayes command set - ati4 will list the status of the registers at s0=1 will make the modem answer incoming calls and than reverse the order of which modem dials the other... seyon -modems /dev/ttyS0 make sure minicom is running on a different modem line than seyon # # /etc/minrc.dfl # pr port /dev/ttyS1 <<<---- pu baudrate 115200 #pu baudrate 38400 # #u mautobaud Yes pu autobaud Yes # pu hasdcd Yes pu mdropdtr Yes # # Default from minicom: S7=45 S0=0 L1 V1 X4 &c1 E1 Q0 # pu minit ~^M~ATZ S7=45 S0=1 L1 V1 X4 &c1 E1 Q0^M # # pu mdialpre ATdt # pu minit ~^M~ATZ^M~ # pu mreset ~^M~ATZ^M~ # # pu updir . # pu downdir . # pu scriptdir /var/lib/minicom # pu scriptprog /usr/bin/runscript # # end of file 3. use your WinNT or Win95 or other linux to dialup and connect # # chck your login, passwd, tel# to be calling the ppp server you just set up # rh-5.1_client# /etc/ppp/ppp-on rh-5.1_client# /etc/ppp/ppp-off to disconnect 4. ping your ppp server...ping yourself...ping the internet... else...start over and insert changes as needed... check for ppp routing tables.. route -nv, ifconfig -v Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface -->> 198.xx.yy.zz 0.0.0.0 255.255.255.255 UH 552 0 0 ppp0 10.0.0.0 0.0.0.0 255.0.0.0 U 1500 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 3584 0 0 lo -->> 0.0.0.0 198.xx.yy.zz 0.0.0.0 UG 552 0 0 ppp0 ( the default 0.0.0.0 route might vary for your system ) have fun alvin