LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   YUM using wrong NIC (https://www.linuxquestions.org/questions/linux-networking-3/yum-using-wrong-nic-366655/)

ocgltd 09-24-2005 03:52 PM

YUM using wrong NIC
 
I have a Fedora Core 4 box with dual NIC's, running a phone system. One NIC (eth1) on the internet, one (eth0) on the LAN (which accesses the internet via a different firewall).

I have setup IPtables so that only one protocol can get out eth1, used for the phone system. All other traffic is supposed to go out eth0 (including YUM updates).

My dmesg shows that YUM is always trying eth1 - which is blocked. How do I force YUM and other apps to use eth0? In case this is route related, here is my info (eth0 = NIC A):

[root@pbx etc]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.31.254.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.31.253.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 172.31.253.1 0.0.0.0 UG 0 0 0 eth1
[

Any ideas? How do I change the route/path used for all traffic EXCEPT my phone traffic?

dexteroo 09-25-2005 01:11 PM

The basic problem is that your default gateway is through eth1. If you want only your phone to go through eth1, then you should setup a few static routes to define the destinations which it would be accessing and then change your default gateway to eth0.

I hope this helps, though the important thing is everything should go through eth0 EXCEPT your phone, which should go through eth1, so just make the routing match those rules and u should be fine.

ocgltd 09-25-2005 04:01 PM

That sounds workable! Now...how? (I haven't created/deleted routes before)

Thanks

dexteroo 09-27-2005 06:58 PM

You could start by removing the default gateway from eth1 and only putting the one on eth0. Then you probably should read the man page for the route command. That should put you on the right path. However u should also know the IPs of all the machines your phone communicates with.


All times are GMT -5. The time now is 08:01 AM.