Hello I'm trying to understand how OpenVPN works and I'm wondering the following thing :

Since all the traffic should pass through tun0 once the computer is connected to the VPN you should be able to block et0 using iptables and be fine. However with Wireshark I'm still reading packets going to the VPN server through eth0, but then what is the purpose of tun0 ?


Your "clear" unencrypted traffic goes to tun0, where openvpn encapsulates and encrypts it, and sends it out of eth0 to the remote gateway, where it is decrypted.

So if you block eth0, then you will prevent the encrypted packets being sent to the remote gateway.

tun0 provides a routing path. If you sent your packets directly out of eth0, then they would not be encrypted, they would go in clear. tun0 has its own IP address and packets destined for the remote network are routed to this IP address.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.