1

I want to block all traffic between my two interfaces. I am using erpxe on the eth1 interface and it seems that when I boot into erpxe, it pulls an ip address from eth0. How can I accomplish this via iptables?

eth0      Link encap:Ethernet  HWaddr 00:0f:b5:fb:d7:ca  
          inet addr:192.168.2.129  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:b5ff:fefb:d7ca/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32094 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27377 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22013025 (20.9 MiB)  TX bytes:4120708 (3.9 MiB)

eth1      Link encap:Ethernet  HWaddr 00:0f:b5:f6:a2:dd  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:b5ff:fef6:a2dd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20173 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18944 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1304135 (1.2 MiB)  TX bytes:25538091 (24.3 MiB)
  • I'm a little confused. You say you think eth1 pulls an IP from eth0? Is eth0 a DHCP authority? eth0 and eth1 have IP addresses in completely different networks. Unless you have a route that allows traffic to go from 10.0.0.0/24 to 192.168.2.0/24 traffic cannot route from one network to the other so I'm not sure what you are trying to accomplish with iptables. – user5870571 Mar 31 '16 at 15:38
  • I would disable routing. Check cat /proc/sys/net/ipv4/ip_forward and check if it is enabled – Jofre Apr 1 '16 at 18:04
  • I did that and it comes back with a "1", so I am assuming it is enabled. – eworts Apr 4 '16 at 10:42
0

Eth0 is on my LAN and I am using eth1 for my ERPXE service. Eth1 is using DHCP so every time a pc boots from PXE, it pulls an address from eth1. Unfortunately my pc tries to pull an IP address from eth1, but ends up pulling one from eth0 which isn't a DHCP server.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.