You have gotten your adsl modem (in my case a speedtouch 510) and you want to use linux to do the routing and firewalling stuff. Mainly because the 510 is a very brain dead modem, which mangles too long DNS packets, can’t do IPv6, etc, etc.I’ve seen a lot of pages about
DHCP_SPOOF(for details I refer to google). People remarked that those things worked, but are a hack. If you go down this rat hole, use
DHCP_SPOOF, because that is a lesser hack IMO. Also I have KPN ADSL (Netherlands), you might have more luck if you use ADSL from bbeyond. If I knew then what I know now, I hadn’t taken KPN ADSL… Anyhow, I couldn’t get either of these hacks to work at my place, so I needed something else. This page tells you what I did; it boils down to using the modem as some kind of bridge and do the actual calling from your linux box. You actually get a
ppp0device which is your Internet connection. Just as in the go’old times ;-) You need to setup your local network so that you can communicate with your modem. This means having a 10.0.0.0/8 address on your ethernet that is connected to your modem.
modem sideIt is assumed you can reach your modem on 10.0.0.138 and you have a browser handy. Put the CD from KPN in your computer and find a file called
PPTP.INIon it. Upload this configuration file to your modem. You may need to rename the file to
PPTP.ini. Next configure your modem, disable
DHCP, i.e. all the br0ken stuff. Your modem now only bridges between the local ethernet and the adsl connection. Note: I couldn’t get the bridging going be using easy-setup (->Bridging) in the modem’s configuration, I really had to upload this
PPTP.INIfile to the modem.
pptp-linux, it’s in Debian/Ubuntu. Configure it to make it work. Examples of configuration can be found on the website from pptp-linux.
Make it work at boot time - the Debian wayThis was a bit difficult, but I got it working in the end. In
/etc/ppp/peerscreate a file with a name for your connection. I called mine
xs4all, in there put:
Also be sure to update the
pty "pptp 10.0.0.138 --nolaunchpppd" user `yourusername@axs4all' lcp-echo-interval 10 lcp-echo-failure 3 defaultroute persist
/etc/ppp/pap-secretsaccording to pptp-linux’s documentation.
/etc/network/interfaces add the following:
# ADSL ppp config iface xs4all inet ppp provider xs4all
provider xs4all must match the name of the file under
auto xs4all somewhere in that file and you’re set to
trying it outDo a
pptp 10.0.0.138, this should yield (after one or two seconds) a
ppp0interface with your ip address. After this I was able to ping hosts on the Internet. It worked :-):
ppp0 Link encap:Point-to-Point Protocol inet addr:xx.xx.17.126 P-t-P:xx.xx.250.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:1036930 errors:0 dropped:0 overruns:0 frame:0 TX packets:639014 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:1167757439 (1.0 GiB) TX bytes:50856576 (48.5 MiB)Kill your
pppddaemon and try the command
pon xs4all, this should now also work. Kill the connection with
poff xs4all. If this works the stuff from
/etc/network/interfacesshould also work. Try
ifup xs4all, if that works the interface should also come up during boot.