Hi,
I've got a BT 2700HGV with 1 static IP address. I have a Mandriva Linux server with 2 nics, one on the internal network (using a static IP address 172.22.17.20) and one connected to the BT router (using DHCP). I have set up port forwarding on the router to point web server traffic at the Linux server. The firewall is set to allow HTTP traffic.
The Linux server can go out to the web on the BT connection no problem. However when I try to connect to the webserver from outside either using my url or the IP address the connection times out.
Anyone got any ideas?
Thanks
Andy
Solved! Go to Solution.
Swapping the network leads round fixes the problem! It was coming in on one and going out on the other just like you said. Swapping the leads round adjusted the priorities and away we went!
Diolch yn fawr iawn Gwaelod.
Which IP address on your Linux server have you bound the HTTP port to?
To be honest I don't know! How do I find out?
Set Apache to listen on port 80 of the 2 IP addresses i.e. Listen 172.17.22.20:80 and Listen 192.168.1.64:80 being the internal and external IPs respectively. But it hasn't made any difference
How does the Linux box connect to the Internet? Does it go directly through the router on the 192.168 address or through your local network? ie if you disconnect the local ethernet cable, but keep the one connected to the router can you access the Internet?
When I set up the conection my routing table looked like this
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 10 0 0 eth1
link-local * 255.255.0.0 U 5 0 0 eth0
link-local * 255.255.0.0 U 10 0 0 eth1
172.22.0.0 * 255.255.0.0 U 5 0 0 eth0
default 172.22.17.1 0.0.0.0 UG 5 0 0 eth0
default 192.168.1.254 0.0.0.0 UG 10 0 0 eth1
If I take out the default GW for 172.22.17.1 then I can access the Internet but it doesn't persist after a reboot.
Not sure if this is a red herring or not.
The server is a Moodle server which I want to be accessible inside and outside the school hence the dsl line (it isn#t possible through the county provided internet) and the additional card. The server is accessible internally but not externally via www.abermoodle.com (the dns is setup to point at 81.136.226.231) and the router is port forwarding to 192.168.1.64. I can ping abermoodle.com (whihc I guess is the router replying) but I timeout on the server replying.
Diolch am eich cymorth
I think what might be happening is the traffic coming in on eth1 card is being responded to eth0 as the default gateway is on eth0. I don't think the traffic is then being routed properly because of this.
What happens if you temporarily disable eth0?
Another thing to look at is if the firewall settings (settings > firewall on the router) are allowing port 80 through to your linux box. Do you have any 'allowed applications' there?
Swapping the network leads round fixes the problem! It was coming in on one and going out on the other just like you said. Swapping the leads round adjusted the priorities and away we went!
Diolch yn fawr iawn Gwaelod.