Jump to Navigation

VPN woes

Yet another random wifi network to connect to - this time in a small cottage in Slovenia. It actually allows access to internet, allows me to setup a VPN, so all seems well. Except for one little thingie: for some reason, it blocks outgoing SMTP traffic.

Well, no problem, there. I want to mail from my laptop, and it delivers to the mail server on my server. No problem there, if I route the traffic through the VPN, right? Wrong. After setting up the VPN it is still not working.

After some head scratching, I figure out the problem. The quick solution is to move the files in /var/spool/mqueue from my laptop to my server That actually works - it is a hack I had never tried before. My mail is now delivered.

The subtle thing that is going on here is that I route all my traffic through the VPN to my server. All traffic - except traffic to the public IP address of my server, like those SMTP messages. OpenVPN sensibly declares a specific route through the internet to that address, as it is the end point of the VPN. Well, that also explains why I had to provide a password to private sites on my server even though the VPN was up. I never quite understood that until now.

The solution is a little bit involved, but the basic idea is simple: the only traffic that can not go through the VPN is the VPN traffic itself. All other packets, even those destined for the VPN end point, can be pushed through the VPN. Once that is in place, my mail problem is solved - but more importantly, all traffic now goes through the VPN, as one would expect.

Blog_article | by Dr. Radut