Using a Linux server to route packets between two private networks
Reference: http://www.tecmint.com/setup-linux-as-router/ We want to route icmp (ping) packets from dev2 to dev4 and the other way around as well (note that both client machines are on different networks). The name of each NIC, along with its corresponding IPv4 address, is given inside square brackets. Our test environment is as follows: Client 1 : CentOS 7 [enp0s3: 192.168.0.17/24] - dev1 Router : Debian Wheezy 7.7 [eth0: 192.168.0.15/24, eth1: 10.0.0.15/24] - dev2 Client 2 : openSUSE 13.2 [enp0s3: 10.0.0.18/24] - dev4 Let’s view the routing table in dev1 (CentOS box): # ip route show and then modify it in order to use its enp0s3 NIC and the connection to 192.168.0.15 to access hosts in the 10.0.0.0/24 network: # ip route add 10.0.0.0/24 via 192.168.0.15 dev enp0s3 Which essentially reads, “Add a route to the 10.0.0.0/24 network through the enp0s3 network interface using 192.168.0.15 as gateway”. Route Network in Linux Likewise in dev4 (openSUSE box) to ping h
Comments
Post a Comment