Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Himai Minh

Vpn traffic not going through tun0

Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good afternoon!

I'm trying to configure a VPN server in Ubuntu using openVpn. I already configured the server.conf file and the client.conf file. These are my configurations:


port 1194
proto udp
dev tun
ca ca.crt
cert grupo04vpn.crt
key grupo04vpn.key # This file should be kept secret
dh dh2048.pem
ifconfig-pool-persist ipp.txt
push "route"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS"
keepalive 10 120
max-clients 100
status openvpn-status.log
verb 5


dev tun
proto udp
remote 1194
resolv-retry infinite
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
verb 3

I'm able to ping (which is the server's ip) from the vpn client, and i'm able to ping (which is the client's ip) from the vpn server. However, when i check the tun0 interface from IPTRAF i see that no traffic is going through tun0, only through eth0. Here you can see a screenshot from iptraf when a ping



This is my network

As you can see all the traffic is going through the eth0 interface, and i guess it should go through tun0.
I would really appreciate any help to make traffic go through the tunnel as it should be.

Posts: 1166
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since you are far more likely to find OpenVPN experts lurking there, you would probably do better to use the OpenVPN forum .

Note - I have used OpenVPN for the last 4 years but can in no way be considered an expert. I use 'tap' rather than 'tun' and I setup my server configuration files 4 years ago and have only touched them once since and that was when, after an OpenVPN update, the log file indicated that I was using a deprecated feature. The structure of my client configuration files has not changed at all in that time; I have a script which creates a a new set of client configuration files as needed. When I monitor my network using 'iptraf' I see exactly what I expect with traffic routed through 'tap0' when I expect it to go through 'tap' .
    Bookmark Topic Watch Topic
  • New Topic