A separate issue of the topic

You need to configure routing between two local networks and machines:

From the first machine 192.168.0.24 - I can ping the second eth1: 192.168.0.155 . If you go through SSH to the second machine eth1: 192.168.0.155 ; kicking third machine eth0: 192.168.2.167 . Also vice versa, but from the first machine the latter is not pinged - eth0: 192.168.2.167


It looks like this on the diagram:

enter image description here

    3 answers 3

    The error was that my rules in iptables did not run automatically. after checking iptables -t nat -L we managed to figure it out and install everything else already.

      At 192.168.0.155, you need to combine both network interfaces into a bridge, or directly connect 192.168.2.167 to the router.

      • Are these picture settings correct? - Insider
      • At 192.168.2.167 it is necessary to register the gateway 192.168.0.1 And on the computer where there are two network card, combine them into a bridge - Antony
      • Could you write to me how to connect them correctly using /etc/network/interfaces and not scripts? - Insider
      • Nah, that's what I could quickly answer. Now heavily loaded with tasks. If you wish, you can google, on this topic a lot of information. - Antony

      Router can add route

      192.168.2.255/24 through 192.168.0.155

      • Route through the router does not suit me. - Insider
      • And enable routing on 192.168.0.155. And that is usually disabled - Sergey
      • Then at the very 192.168.0.24 register this route - Sergey
      • @Insider If the route through the router is not suitable, then the above route should be registered on all nodes of the 192.168.0.0/24 subnet, which require access to 192.168.2.0/24, this can be done either manually or using DHCP. - dsnk
      • @dsnk my knowledge of the network is superficial, could you write how exactly? By car 192.168.0.155 now such settings prntscr.com/8w7vch - Insider