So I have been fiddling around a bit more with my SpeedTouch 510 ADSL modem. I wanted to be able to access the internal webserver in it from my machines on the inside, i.e. those behind the firewall. The modem is on the outside. The IP of the modem is 10.0.0.138 which also makes it a bit problematic since it is not routed normally.

To start with I gave my outside network-card one more ip number, 10.0.0.1 so it would be on the same net as the modem:

ifconfig vr0 alias 10.0.0.1

vr0 is the name of my outside network interface.

Then I had to tell my firewall not to deny those packets since normally 10.0.0.0 and 192.168.0.0-nets are not routed:

add allow all from any to 10.0.0.138 via ${oif}<br />
add allow all from 10.0.0.138 to 192.168.0.0/16 via ${oif}<br />
add allow all from 10.0.0.138 to 10.0.0.0/8 via ${oif}

This allowed me to telnet into the modem as well as access the webpages from my firewall machine but I wanted to use the machines that had ip like 192.168.0.3 to access teh webserver as well. The problem is that the modem doesnt know where these machines are so I had to tell it where to route traffic for the 192.168.0.0 net.

ip rtadd dst=192.168.0.0/16 gateway=10.0.0.1

So now it works when the modem sends the traffic to my firwall that routes it correctly to my PC and such.