(The latest version of this document is at http://www.milkywaygalaxy.freeservers.com. You may want to check there for changes).
Most of the companies in USA and Europe provide "Remote Access Servers" (RAS), so that their employees can dial-in from remote locations either from home or from field. RAS servers are generally Linux RAS servers or MS Windows NT RAS servers.
Nowadays, Virtual Private Network (VPN) is becoming quite popular because it supports broadband and may eventually replace dial-up networking which is very slow running at 56KB/sec. See the VPN HOWTO and VPN-Masquerade howto and java based MindTerm-SSH-HOWTO.
Configuring a dial-up connection on Linux is about as simple as it is in Windows. We will use PPP.
Definition: PPP ('Point to Point Protocol') is a protocol, that makes it possible to make IP-Links (Internet Protocol) between two computers with a modem.
The operating system Linux has this protocol in the kernel (If you compiled it into the kernel). For a ppp-link you need to start a daemon called pppd.
With PPP you can make a link between two hosts which understand the protocol. A link between a Linux host, acting as client and a Windows NT server, acting as server, is called a (Microsoft term) 'Remote Access Service' (RAS) link.
First, see if your modem is supported by linux. Internal Modems (WinModems) do not work with linux. Some WinModems require special tweaking to make it work in linux.
Check if you have all the needed hardware, software and data and hand:
These quick steps will enable you to setup dial-up networking on Linux in just five minutes.
You need the following packages:
The steps below are for MS Windows NT RAS server. The NT RAS requires noauth in wvdial file. The Linux RAS may need different settings. In the sample example given below, you should replace username john with the user ID given to you to login into remote RAS server.
[Dialer myconnection] Username = john Password = passwordofjohn Phone = 982 1956 Area Code = 713 Inherits = Dialer Defaults Stupid mode = 1
# Secrets for authentication using PAP # client server secret IP addresses john ppp0 passwordofjohn john * passwordofjohn
# Secrets for authentication using CHAP # client server secret IP addresses john ppp0 passwordofjohn john * passwordofjohn
lock defaultroute noipdefault idle 1200 usepeerdns proxyarp
#!/bin/bash # This file /etc/ppp/ip-up should not be modified -- make local changes to # /etc/ppp/ip-up.local instead LOGDEVICE=$6 REALDEVICE=$1 export PATH=/sbin:/usr/sbin:/bin:/usr/bin [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE} [ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@" exit 0
#!/bin/sh echo " " echo "Before doing route add......" echo "Output from netstat -nr is : " netstat -nr echo " " echo " Doing route add now.... " # You should change the lines below and add the networks where # your remote machines are ... route add -net 156.15.24.0 netmask 255.255.255.0 dev ppp0 route add -net 172.28.36.0 netmask 255.255.255.0 dev ppp0 route add -net 172.28.39.0 netmask 255.255.255.0 dev ppp0 route add -net 172.28.26.0 netmask 255.255.255.0 dev ppp0 echo "After doing route add......" echo "Output from netstat -nr is : " netstat -nr echo " "
bash$ su - root bash# route add -net 172.28.26.0 netmask 255.255.255.0 dev ppp0 bash# route del -net 172.23.2.0 netmask 255.255.255.0 dev ppp0
#!/bin/bash # This file /etc/ppp/ip-down should not be modified -- make local changes to # /etc/ppp/ip-down.local instead LOGDEVICE=$6 REALDEVICE=$1 export PATH=/sbin:/usr/sbin:/bin:/usr/bin [ -x /etc/ppp/ip-down.local ] && /etc/ppp/ip-down.local "$@" /etc/sysconfig/network-scripts/ifdown-post ifcfg-${LOGDEVICE} exit 0
#!/bin/sh echo " " echo "Before doing route delete ......" echo "Output from netstat -nr is : " netstat -nr echo " " echo " Doing route delete now.... " # Lines below should be same as in ip-up.local but with delete route del -net 156.15.24.0 netmask 255.255.255.0 dev ppp0 route del -net 172.28.36.0 netmask 255.255.255.0 dev ppp0 route del -net 172.23.2.0 netmask 255.255.255.0 dev ppp0 echo "After doing route delete ......" echo "Output from netstat -nr is : " netstat -nr echo " "
noauth user john name wvdial
bash$ su - root bash# tail -f /var/log/messages Bring up another xterm shell window and bash$ su - root bash# man pppd bash# man wvdial bash# cd /etc/ppp bash# nohup wvdial myconnection & bash# tail -f nohup.out Bring up another xterm shell window and bash$ su - root bash# ifconfig -a And you should see ppp device listed and up and running. bash# netstat -nr And you should see ppp device listed along with other interfaces.
bash$ su - root bash# tail -100 /var/log/messages | less bash# cat /etc/ppp/resolv.conf bash# ifconfig -a bash# netstat -nr I looked for route to network 156.15.24.0 (You should see your network as per /etc/ppp/ip-up.local) bash# ping 156.15.24.68 bash# telnet 156.15.24.68 You can also edit /etc/hosts and add these hosts 156.15.24.64 starship 172.28.36.131 gemstone bash# ping starship bash# ping gemstone bash# telnet gemstone bash# ftp gemstone
bash$ su - root bash# killall wvdial bash# killall pppd bash# man killall
bash$ su - root bash# su - someuser bash$ id uid=501(someuser) gid=501(maingid) groups=501(maingid),503(staroffice),505(staff) This shows the groups 'someuser' belongs. bash$ exit bash# usermod --help bash# usermod -g maingid -G staroffice,staff,uucp,dialout someuser bash# chgrp -R uucp /etc/ppp bash# chmod -R ug+r /etc/ppp bash# chmod -R o-rwx /etc/ppp bash# chmod go-rwx /etc/ppp/*secrets bash# chmod u+s /usr/sbin/pppd bash# su - someuser bash$ id This will display groups someuser belongs and you should see uucp. bash$ nohup wvdial myconnection & bash$ tail -f nohup.out
bash$ su - root bash# man route bash# ifconfig -a And look for the IP address of the ppp device, and use it below bash# route add default gw IP_of_ppp_device For example - bash# route add default gw 172.28.36.3
In case you have problems:
bash$ su - root bash# tail -f /var/log/messages And then start myconnection in /etc/wvdial.conf bash# wvdial myconnection bash# ifconfig -a Should list ppp bash# netstat -nr Should list ppp If you have multiple interfaces, like ethernet cards to DSL or Cable modem, to check which route is being used, do: bash# traceroute www.yahoo.com bash# traceroute remotehostname
Preference should be given the console line commands as in previous section, but some people prefer GUI interface. You can use graphical tools like Linuxconf, KPPP, GnomePPP and many others.
Note: I very strongly recommend using command-line console commands 'wvdial' as demonstrated in previous sections, as they are lot simpler and easy to use.
bash$ su - root bash# linuxconf & And select Networking->Client Tasks->Routing & Gateways->Set Other Routes to networks->Add network . Also select Networking->PPP bash# rp3 & bash# rp3-config &
Once you have connection through PPP to remote machines, you can use the VNC to display remote machines on your local display.
Compiling qvwm on Solaris : On Solaris you should install the following packages which you can get from http://sun.freeware.com - xpm, imlib, jpeg, libungif, giflib, libpng, tiff. And you can download the binary package for solaris from http://www.qvwm.org.
Or you can download the qvwm source for solaris from http://www.qvwm.org and compile it using gcc.
Troubleshooting compile: You should put unsigned long before arg in usleep() usleep((unsigned long) 10000)
Linux goodies main site is at http://www.milkywaygalaxy.freeservers.com Mirror sites are at - http://aldev0.webjump.com, angelfire, geocities, virtualave, 50megs, theglobe, NBCi, Terrashare, Fortunecity, Freewebsites, Tripod, Spree, Escalix, Httpcity, Freeservers.
This document is published in 14 different formats namely: DVI, Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich Text Format), Plain-text, Unix man pages, single HTML file, SGML (Linuxdoc format), SGML (Docbook format), and MS WinHelp format.
This howto document is located at:
You can also find this document at the following mirrors sites:
A single HTML file can be created with the command (see man sgml2html) - sgml2html -split 0 xxxxhowto.sgml
A PDF file can be generated from postscript file using either acrobat distill or Ghostscript. And a postscript file is generated from DVI which in turn is generated from a LaTex file. You can download distill software from http://www.adobe.com and from unix and from windows . Given below is a sample session:
bash$ man sgml2latex bash$ sgml2latex filename.sgml bash$ man dvips bash$ dvips -o filename.ps filename.dvi bash$ distill filename.ps bash$ man ghostscript bash$ man ps2pdf bash$ ps2pdf input.ps output.pdf bash$ acroread output.pdf &
This document is written in linuxdoc SGML format. The Docbook SGML format supercedes the linuxdoc format and has a lot more features than linuxdoc. The linuxdoc is very simple and easy to use. To convert linuxdoc SGML file to Docbook SGML use the program ld2db.sh and some Perl scripts. The ld2db output is not 100% clean and you need to use the clean_ld2db.pl Perl script. You may need to manually correct a few lines in the document.
bash$ ld2db.sh file-linuxdoc.sgml db.sgml bash$ cleanup.pl db.sgml > db_clean.sgml bash$ gvim db_clean.sgml bash$ docbook2html db.sgml
You can convert the SGML howto document to a Microsoft Windows Help file, First convert the sgml to html using:
bash$ sgml2html xxxxhowto.sgml (to generate html file) bash$ sgml2html -split 0 xxxxhowto.sgml (to generate a single page html file)
In order to view the document in dvi format, use the xdvi program. The xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux which can be located through ControlPanel | Applications | Publishing | TeX menu buttons. To read a dvi document give the command:
xdvi -geometry 80x90 howto.dvi
man xdvi
And resize the window with the mouse.
To navigate use Arrow keys, Page Up, Page Down keys, also
you can use 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' letter
keys to move up, down, center, next page, previous page etc.
To turn off expert menu press 'x'.
You can read a postscript file using the program 'gv' (ghostview) or 'ghostscript'. The ghostscript program is in the ghostscript*.rpm package and the gv program is in the gv*.rpm package in Redhat Linux which can be located through ControlPanel | Applications | Graphics menu buttons. The gv program is much more user friendly than ghostscript. Also ghostscript and gv are available on other platforms like OS/2, Windows 95 and NT. You can view this document even on those platforms.
To read a postscript document give the command:
gv howto.ps
ghostscript howto.ps
You can read an HTML format document using Netscape Navigator, Microsoft Internet explorer, Redhat Baron Web browser or any of the 10 other web browsers.
You can read the latex, LyX output using LyX an X Window front end to LaTex.
To convert any HTML document to Linuxdoc SGML use the tool 'html2sgml' from http://www.abc.se/~m9339/prog/html2sgml.html.
Copyright policy is GNU/GPL as per LDP (Linux Documentation project). LDP is a GNU/GPL project. Additional restrictions are - you must retain the author's name, email address and this copyright notice on all the copies. If you make any changes or additions to this document then you should intimate all the authors of this document.
This section is written by John Newbigin, Email: jn@it.swin.edu.au Below is extract from http://uranus.it.swin.edu.au/~jn/linux/ppp/linuxppp.htm
See also PPP HOWTO
"" * "" "jn" * "MyPassword"
"" * "" "csse-mm\\jn" * "MyPassword"
name "jn" or name "csse-mm\\jn"