I have a home network set up this way:
Code:
-----------
|DSL MODEM|
-----------
|
|
------- ------------
| HUB |---|WEB SERVER|
------- ------------
|
|
--------
|ROUTER|
--------
| | \--\
| | |
---- ---- ---------
|PC| |PC| |PRINTER|
---- ---- ---------
I hope the drawing is understandable..
Here's a little explanation:
The webserver (apache on slackware 9.1) and the router (Netgear RT314) get their dynamic IP addresses from the modem. (2 diffrent addresses. That way anyone trying to hack the server will leave my local network alone. My ISP is nice enough not to charge me for the 2nd IP
)
The router then supplies the local network with regular non routable addresses (192.168.0.0)
The problem:
When using ssh or ftp from the PCs to the webserver, packets are going through the default gateway (the router) then through its default gateway (my ISP), then back to the web server. This is annoying when transferring files because my ISP limits the upload to 60kBps.
I could set up a static route between the router and the webserver, but since they both use dynamic IPs, it wouldn't last more than a day or two.
So i was wondering, is it because i blocked a port that shouldn't be blocked that the linux server and the router don't realize they could be talking directly to each other? I know the netgear uses RIP on the local network, but i'm not sure it's using any routing protocol at all on the WAN side.. It's probably just acting as a client. (?)
I am thinking about setting up a virtual interface on the linux webserver (that way the address wouldn't change) and a static route on the router. Any other (and hopefully better) ideas?
Thanks, and sorry for the long post!