Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux Server and Local Network

Status
Not open for further replies.

jh0

Technical User
Jan 22, 2005
16
US
Hello,

I have a Linux (FC3) server running off of a switch connected to a cable modem. Also connected to the switch is a Linksys wireless/wired router, which serves a small home network.

My problem is that traffic between the Linux server and the Linksys-served home network is much slower than it should be. Packets appear to be making it past the cable modem, out onto the WAN, and coming back to the cable modem to reach the Linux server (or vice versa).

I need to figure out how to make a direct route between the server and the home network. I have an open port on the Linksys router that I can use, as well as a spare NIC on the Linux server, so I could do it that way. I just need to know what I need to do for routing information on the server and the Linksys router. I'm somewhat familiar with iptables and route on Linux, but nowhere near an expert.

Any help would be very greatly appreciated. Thank you so much!

Jacob
 
I could do that, but I forgot to mention that the server and router are on different IP addresses; otherwise, that would work. The router, of course, only supports one external IP address. Thank you for the tip, however.
 
Of course the server and the router are on different IP addresses, they have to be to function properly. Did you mean different IP LAN segments? Like the router is 192.168.0.1 and the server is 10.0.0.2???

Internet Directory
 
No, I meant different external IP addresses because they are both connected directly to the cable modem.
 
I solved the problem by:
- enabling port forwarding on the Linux box
- enabling forwarding and IP masquerading for the second interface, and assigning 192.168.10.1 to it
- plugged the router into the second eth interface, set its address to 192.168.10.10 and gateway to 192.168.10.1

Now all internet traffic is routed through the Linux box, and since most of the local network's traffic is for the box, it all works wonderfully. The local network had a static external IP address but didn't really need one.

Alternatively, I would have preferred to do the following:
- connect the server's second eth interface to the router, with a static internal address
- set up routing (RIP) on the router to send all traffic to the server's IP address to the static internal address that was set up
- set up routing on the Linux server to handle all traffic on the second eth interface accordingly

However, my Linksys router doesn't allow for static internal addresses, and this setup is generally too tricky, so I opted for the first plan.

Jacob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top