Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jun 2009
setting up two ethernet cards and routing via IP
Now I (sort of) know how to use IPTables to block any clients with specific IP ranges from accessing the wrong VNC's. The problem is I'm not certain if the IP's will stay constant after being deployed and I'm afraid I could end up with a client that needs to connect to VNC 1-7 has an IP that is blocked from connecting to those VNC's. What I would rather is to make use of the two Ethernet cards to provide two IP's with those connecting to one IP having access to VNC 1-7 and those on the other IP connecting to 8-14.
That would mean that I need to set up my Ethernet ports to be independent. Currently eth0 works correctly but eth1 is detected but doesn’t respond to ping, and if I try to send a ping from my Linux box it attempts to ping using eth0 IP instead of eth1 even if eth0 has no connection and eth1 does. If i disable eth0 eth1 works fine. I had read previously that this was common problem and I believe the solution had something to do with setting up the routing tables, but I can't seem to find any details on Google.
So I have two questions.
1) Would setting up my Ethernet cards to have two separate IP be a functional and best way of getting the functionality I want?
2) If yes then how do I get the two IP to function at the same time?
06-26-2009 #2Originally Posted by dsollen
Originally Posted by dsollen
ifconfig eth0 up ifconfig eth0 ipaddress0 # or dhcpcd eth0ifconfig eth1 up
ifconfig eth1 ipaddress1
ping -I eth0 someipaddress ping -I eth1 someipaddress
From another machine:
ping ipaddress0 ping ipaddress1
The thing is, if I do this on my box... I can (for example) ssh into the box using either ipaddress0 or ipaddress1, but both end up on the same box. It doesn't make a difference
Getting a different response, such as in your case where you want to feed certain VNC sessions to NIC0 and others to NIC1. How to do that is a different story all together. You may have a better idea about how that would work than I have.
You can, however, provide different iptables rules for each NIC, so if that is needed, that is not a problem.Can't tell an OS by it's GUI