0

I currently have a workstation set up with two NICs on separate networks.

My current setup is this:

eth0: LAN
eth1: Outside internet

I have a default gateway set up on eth1 to reach the outside internet. I also have a route in place to set the default gateway for the LAN on eth0. I can browse the internet as well as reach the local LAN with no problems. The issue I'm having is that when I try to access the Ubuntu machine from another machine on the LAN, the packets are coming in on eth0 but leaving on eth1. How can I set up a rule that ensures that all traffic for the LAN subnet ignores eth1?

migrated from serverfault.com Mar 23 '16 at 17:28

This question came from our site for system and network administrators.

  • How do you know it's going out the wrong Ethernet port? Please add in some detail on what the networks look like and what your routing table is. – mkomarinski Mar 23 '16 at 17:58
0

if you do not have network route for your LAN side, use this command to create one:

/sbin/route add -net 192.168.1.0/24 192.168.1.1 dev eth0

this assumes your local area network addresses are between 192.168.1.1 and 192.168.1.255 and 192.168.1.1 is your router's IP address. Your netmask is 255.255.255.0. If these are any different you will need to modify these addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy