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 `SIP_SPOOF` and `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 `SIP_SPOOF` instead of `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 `ppp0` device 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 address on your ethernet that is connected to your modem.

modem side

It is assumed you can reach your modem on and you have a browser handy.

Put the CD from KPN in your computer and find a file called `PPTP.INI` on it. Upload this configuration file to your modem. You may need to rename the file to `PPTP.ini`. Next configure your modem, disable `DNS`, `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.INI` file to the modem.

linux side

Download `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 way

This was a bit difficult, but I got it working in the end. In `/etc/ppp/peers` create a file with a name for your connection. I called mine `xs4all`, in there put:
pty "pptp --nolaunchpppd"
user `yourusername@axs4all'
lcp-echo-interval 10
lcp-echo-failure 3

Also be sure to update the `/etc/ppp/options` and `/etc/ppp/pap-secrets` according to pptp-linux's documentation.

And in /etc/network/interfaces add the following:

# ADSL ppp config
iface xs4all inet ppp
    provider xs4all

where provider xs4all must match the name of the file under /etc/ppp/peers. Don’t forget auto xs4all somewhere in that file and you’re set to go.

trying it out

Do a `pptp`, this should yield (after one or two seconds) a `ppp0` interface 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:
          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 `pppd` daemon 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/interfaces` should also work. Try `ifup xs4all`, if that works the interface should also come up during boot.

the future and beyond

Next I need to reconfigure my firewall and setup the (new) internal network, but that is all trivial.