Testing the Network Connectivity
In our typical OpenVPN setup, we have connected two networks (192.168.250.0/24 and 172.16.76.0/24) via two Linux servers that are connected to the Internet via a default gateway. Between the two Linux servers is a tunnel that uses the virtual IPs 10.179.10.1 and 10.179.10.2.
In the connected local networks there are two Linux machines that we will use to test our tunnels (perhaps by conveniently accessing them remotely with Secure Shell). We will now use the tools ifconfig
, route
, and ping
to show and test the network settings.
In our first step, we will check the local system's network address, default route, and if the default router is pingable. The command ifconfig
will print statistics of all active network interfaces:
root@sydney:~ #ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:AE:8C:D7 inet addr:192.168.250.128 Bcast:192.168.250.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets...