1

I have 172.16.8.0/24 on eth1 and 10.0.0.0/8 on eth2, I would like the two networks to communicate, but restricting the broadcast, allowing only the file sharing and the tcp port 2638 from station 10.0.0.4/8.

My interfaces are configured like this:

  • eth0: auto ppp1
  • eth1: 172.16.8.254/24
  • eth2 10.0.66.254/8

How would the iptables script look?

5
  • 1
    First you need to activate ip forwarding between them. Jan 15 '18 at 14:21
  • 1
    Hello, it's active, an internet works in ppp0 and the transparent proxy listens on eth1, with DHCP and SAMBA, I need eth1 to see the eth2, and then limit the use of devices to operate only the file sharing and tcp port 2638 between eth1 and eth2
    – silasmg
    Jan 15 '18 at 16:22
  • I would advise improving the question. Jan 15 '18 at 18:20
  • Why are you trying to communicate between different interfaces on same device? You are already able to connect any interface you want on same machine. However, If you want different clients connect to eth1 via eth2, you need to write NAT rule.
    – ibrahim
    Jan 15 '18 at 18:50
  • In eth1 I have 50 clients, in eth2 I have 200 clients. eth1 is the local network, eth2 is a network in another building, where I connect through a ubiquit rocket m5, I need to filter the broadcast and stop receiving the dhcp from that network of 200 clients. I am not an admin of eth2 network, I am admin of eth1, the eth2 network is poorly configured, with many cascading, many routers delivering dhcp. I tried to create the route: route add -net 10.0.0.0 netmask 255.0.0.0 dev eth1 I need to create the rule in iptables, I do not know if I'm on the right way.
    – silasmg
    Jan 16 '18 at 12:27

Your Answer

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

Browse other questions tagged or ask your own question.