Hi everyone,
With help of some nice people in this forum I finally managed to connect two LANs with OpenVPN. The setup is basically as described here:
https://openvpn.net/index.php/open-source/documentation/howto.html#scope. Everything works fine and as expected. I can reach and ping machines from either end of the tunnel.
Now I was curious and wanted to develop a deeper understanding on what is happening "under the hood". Thus I started tcpdump and had a look on the tun and eth devices. But if I watch the VPN traffic on the tun device on the client
tcpdump -i tun0 net 10.205.76.0/24
I see nothing at all. No packages are coming by. My simple question to the pros here is: why? Shouldn't I see some traffic here? How do I "track" the packes in the nework(s)?
Thx!
For reference here my configs:
proto udp
port 1194
dev tun
server 10.205.76.0 255.255.255.0
topology subnet
persist-key
persist-tun
keepalive 10 60
#duplicate-cn
#ccd-exclusive
user nobody
group nogroup
daemon
verb 3
tls-version-min 1.2
cipher AES-256-CBC
auth SHA256
remote-cert-tls client
management 127.0.0.1 5555
client-config-dir /etc/openvpn/ccd
tls-auth /etc/openvpn/keys/ta.key 0
dh /etc/openvpn/keys/dh2048.pem
pkcs12 /etc/openvpn/keys/OpenVPN_PAW_Server.p12
crl-verify /etc/openvpn/keys/OpenVPN_PAW_CRL.pem
push "route 192.168.193.0 255.255.255.0"
route 192.168.0.0 255.255.255.0
iroute 192.168.0.0 255.255.255.0
proto udp
port 1194
dev tun0
management 127.0.0.1 5555
client
remote john.doe.com
persist-key
persist-tun
user nobody
group nogroup
nobind
verb 3
tls-version-min 1.2
cipher AES-256-CBC
auth SHA256
remote-cert-tls server
pkcs12 /etc/openvpn/keys_PAW/OpenVPN_PAW_Client1.p12
tls-auth /etc/openvpn/keys_PAW/ta.key 1
+----------------------------------+ +----------------------------------+
| ROUTER (Home) | | ROUTER (Office) |
| |public IP INTERNET public IP| |
|static routes: |-----------------------------------------------------|static routes: |
|10.205.0.0/16 via 192.168.0.43 | |10.205.0.0/16 via 192.168.193.240|
|192.168.193.0/24 via 192.168.0.43 | |192.168.0.0/24 via 192.168.193.240|
|port forwarding: | |port forwarding: |
|udp/1194 192.168.0.43 | |udp/1194 192.168.193.240|
+-----------------+----------------+ +-----------------+----------------+
|192.168.0.1 |192.168.193.245
| |
+-------------------+---------------------+ +-------------------+---------------------+
| | | |
|192.168.0.43 |192.168.0.X |192.168.193.240 |192.168.193.Y
+-----------------+----------------+ +----------------+-----------------+ +-----------------+----------------+ +-----------------+----------------+
| OpenVPN CLIENT | | PC | | OpenVPN SERVER | | PC |
| | | | | | | |
|ip forwarding enabled: | | | |ip forwarding enabled: | | |
|net.ipv4.ip_forward=1 | | | |net.ipv4.ip_forward=1 | | |
|tun 10.205.76.2 | | | |tun 10.205.76.1 | | |
+----------------------------------+ +----------------------------------+ +----------------------------------+ +----------------------------------+