Skip to content

Making Coyote Linux work with KPN ADSL

The Dutch ISP KPN gives you a modem+router to access the internet. The router they give you is a custom version of an Alcatel Speedtouch (model varies) and is extremely limited. I don’t use any VOIP services, so I replaced that router with a Speedtouch 546 (which supports DHCP spoofing) so that I can use my own Coyote Linux based router.

Once the DHCP spoofing was configured everything basically worked, except for the fact that KPN’s default gateway is outside of the current subnet. It is said that only Windows knows how to deal with this. To work around this, you need to add two routes: one to tell on which ethernet port the IP address of the gateway can be found and one to set it up as default gateway.

To do that in Coyote Linux, make this script and name it /etc/rc.d/rc.add-kpn-routes:

# KPN has a router that is outside the subnet, therefore these routes need to be added manually. Only windows can handle it normally.
 "==========" >> $log_file
 "Called with param: $1" >> $log_file
 "Current route:" >> $log_file
route -n >> $log_file
 "" >> $log_file
 `cat /etc/dhcpc/`
 "route add $dhcp_router dev eth1" >> $log_file
route add $dhcp_router dev eth1
 "route add default gw $dhcp_router eth1" >> $log_file
route add default gw $dhcp_router eth1
 "==========" >> $log_file

Then in /etc/rc.d/rc.line_up add:

# Add KPN routes
[ -x /etc/rc.d/rc.add-kpn-routes ] && . /etc/rc.d/rc.add-kpn-routes $1

When Coyote has started, it can take a while for the script to run, but it works eventually.

Don’t forget to add a newline at the end of the last line. The default editor Coyote uses doesn’t do that by default and I can somewhat remember that bad things happen when that newline misses.

    No Comments ( Add comment / trackback )