ping on two interface

ping on two interface

Post by Ed » Thu, 24 Jun 2004 02:42:32




> I have tow interface on one linux box eth0 and eth1.
> eth0 192.162.1.1 255.255.255.0
> eth1 192.162.2.1 255.255.255.0.
> For one of my test, linux behavielike this:
> 1) If it receives a "ping" request on eth0, to 192.162.2.1, do not reply.
> 2) If it receives a "ping" request on eth1, to 192.168.1.1, do not reply.
> Right now, it seems it replies to the request to both address on both interfaces.
> How can I cnfigure it to bahave the way I want?
> Thanks
> M

If I understand well you want to prevent pings to your NICs.
If that's the case, have a look at iptables:

Something like:
iptables -A INPUT -p icmp --icmp-type echo-reques -i eth0 -j DROP

Not tested so check the man pages first ;)
Ed.

 
 
 

ping on two interface

Post by Ma » Fri, 25 Jun 2004 01:52:25


I have to make it clearer:
Quote:> I have tow interface on one linux box eth0 and eth1.
> eth0 192.162.1.1 255.255.255.0
> eth1 192.162.2.1 255.255.255.0.
> For one of my test, linux behavielike this:
> 1) If it receives a "ping" request on eth0, to 192.162.2.1, do not reply.

1.1) If it receives a "ping" request on eth0, to 192.162.1.1, do reply.
Quote:> 2) If it receives a "ping" request on eth1, to 192.168.1.1, do not reply.

2.2) If it receives a "ping" request on eth1, to 192.168.2.1, do reply.
Quote:> Right now, it seems it replies to the request to both address on both interfaces.
> How can I cnfigure it to bahave the way I want?
> Thanks
> M


 
 
 

1. can't ping any interfaces after two days, why?

hi all, I used to have a stable system (RH 7.1 based, with Kernel 2.4.6), it
ran a couple of month a time. Recently I updated glibc, kernel-2.4.9, along
with other goodies from RH update site. It starts to lose network capability
after it is up for two days or so.

when rebooted fresh, it workes fine for about 2-4 days, and then suddenly
can't ping anything (localhost and others), I have restarted network, all
interfaces (lo, eth0, eth1, ppp), nothing helps. There is no unusual entries
on /var/log/message file. the system is still functional (except network
part). route table is also fine.

I have backed to old glibc, kernel 2.4.6 and initscripts, util-unix to they
were before and even boot to old kernel 2.4.6, the problem persists.

could someone offer some ideas? thanks

Dr.J

2. Is there a "guru" in the house?

3. problem in pinging...: linux having two interfaces and on the same subnet ip addresses.

4. How does Linux NAT work ?

5. PING 127.0.0.1 with two n/w interfaces?

6. TrafficShape in IPFW?

7. Ping stops after 10-20 pings on ethernet interface

8. Enterprise Management Forum (Unicenter TNG, OpenView, Tivoli, Platinum)

9. dhcpd on for one interface on two interface system ?

10. Newbie connect question: Two PCs, both RH 5.1, two NE2000 cards: failure to ping!!!!!!!!!!!

11. Two gateways on two interfaces (very frustrated)

12. Running two httpd daemons on two interfaces

13. One Process on the machine having two IP address and two ethernet interface.