# Two ethernet, one ping

## oslinux

Hi all, i'm a new gentoo user, but i have some problems with it, here's one:

I Installed gentoo on two PCs, and on both i've the same problem:

I've two ethernet cards per pc, one of them is connected to a gateway(Witch is connected to internet), and the other directly to internet, if i activate both the cards, i can't receive any ping on the card connected to internet, while if i am connected only with the internet card, i can receive ping and other users can connect to me.

unny thing is that (it seems watching ifconfig) i can receive the ping, but i can't transmit the echo. (RX raise by 1 but TX stay to 0)

What could i try?

Thanks!

Luca

----------

## ce110ut

what are you using to direct/manage traffic?  netfilter?

----------

## oslinux

On the newer PC, i'm not using nothing (Just installed gentoo) in the other i'm using iptables with webmins to manage it. (It's a server)

----------

## cyrillic

 *oslinux wrote:*   

> I've two ethernet cards per pc, one of them is connected to a gateway(Witch is connected to internet), and the other directly to internet, if i activate both the cards, i can't receive any ping on the card connected to internet, while if i am connected only with the internet card, i can receive ping and other users can connect to me. 

 

Unless you are setup for bonding or load balancing or some other fancy stuff, then you don't want 2 routes to the internet, just 1.

Unplug one of your ethernet cables, and the problem should be fixed.

----------

## oslinux

yeah you're probably right, it's only that i need to connect (more) directly the server to my private network, there's a way to limitate my other card to ssh, proftp and cups (Just for private networking) ?

----------

## ce110ut

yes, by using netfilter (iptables).  Familiarize yourself with Network Masquerading and Network Address Translation (NATs).  Use your favorite search engine and look up "iptables NAT" on guides on how to use iptables with NATs and Masq's.  With those, you can route traffic based on packet-filtering.  For instance, you can direct all ssh connections down one interface and others go on another interface.

I hope that helps.

----------

