Do you have your routes set up correctly in the gateway? If you can ping your second card from the router and vice versa, and you can ping the net from your first card, it sounds like you need to add a default gateway with the route command.
I'm trying to set up a gateway before my router, so it's between my modem and router. I've got it working with the external card, the one that's connected to the modem so I can acces the net from the linux gateway. The problem accures when I connect the other network card from the gateway to my routers WAN port. Both router and the second card in the gateway connected to the router have static ip's. But I can't ping the gateway from my router nor access the net. What have I done wrong?
Do you have your routes set up correctly in the gateway? If you can ping your second card from the router and vice versa, and you can ping the net from your first card, it sounds like you need to add a default gateway with the route command.
I'm not exactly sure of how to do this but is it something lik this;
route add default gw XXX.XXX.XXX.XXX dev eth0
route add -net XXX.XXX.XXX.0 netmask 255.255.255.0 gw XXX.XXX.XXX.XXX dev eth0
Where XXX.XXX.XXX.XXX is the gateway to the internet
But still there's no connection between the router and the gateway..
Here's an example of how you want the routes setup:
Gateway LAN:
ifconfig 192.168.10.1
The routes to 192.168.10.0/24 shoudl be automatically added, and the default should be set by whatever you are using for your connection.
Router WAN:
192.168.10.2
Router LAN:
192.168.11.1
Host:
ifconfig 192.168.11.2
route add default gw 192.168.11.1
Some routers don't like to play nice with two nets, but if you have both the router WAN and LAN set the same, it gets confused as to where to look for hosts on the network set.
Bookmarks