Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


OpenVPN doesn't tunnel traffic to VPN host server
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

OpenVPN doesn't tunnel traffic to VPN host server

Hello,

I have a slight problem with OpenVPN. I openvpn-as installed on a small VPS server which is fine for my needs. On the VPS I also have some small web applications running such as owncloud to make use of the disk space on the box, this I access via the web.

When I access the VPS via SSH or access owncloud via the web (which is hosted on the same IP as the VPN) both my Windows machine and iPad route the traffic straight over the network rather than tunnelling the traffic via the VPN. This is a massive pain as I use the VPN to prevent my provider traffic shaping my connection. (It's a mobile connection and tethering traffic is slowed during peak times.) As soon as my provider detect the traffic coming from a PC (e.g. the SSH or owncloud connection) they throttle my connection for the remainder of the evening.

How can I get connected to the web apps and SSH via the VPN?

Thanks :)

Comments

  • HC_RoHC_Ro Member
    edited December 2013

    I am a littel confused, but are you sure your session on the PC is set to tunnel all traffic? Thats what it sounds like but it seems to easy, perhaps missed something here.

  • @HC_Ro said:
    I am a littel confused, but are you sure your session on the PC is set to tunnel all traffic?

    How would I check? I've never found such an option in the OpenVPN Connect app.

  • StellaEVStellaEV Member
    edited December 2013

    /sbin/iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -j SNAT --to 199.241.30.133

    (here, 192.168.10.0/24 is my openvpn network and subnet, 199.241.30.133 is my outbound ip)

    You also need to push the default gateway in OpenVPN Config

    push "redirect-gateway def1 bypass-dhcp"

    And push the DNS if necessary

    push "dhcp-option DNS 8.8.8.8"

  • HC_RoHC_Ro Member
    edited December 2013

    Perhaps post your configs on both ends here and iptables settings.

    If you have a active session and googling your IP shows the real one then theres a config issue.

  • Can any of this be configured from the web admin panel?

  • @HC_Ro said:
    Perhaps post your configs on both ends here and iptables settings.

    If you have a active session and googling your IP shows the real one then theres a config issue.

    How do I find the configuration settings on my Windows device?

    The session works fine except for accessing services on the VPN server. So on my VPS I have openvpn-as and Nginx running. If I try to connect to a website on the Nginx server whilst connected to the VPN, traffic is routed normally and doesn't go through the VPN. All other traffic does though, expect for any traffic on the same VPS.

  • easy way: configure it on access page

    longer or more troublesome way: set up vpn on another vps. access web resources from the other vpn.

  • @Manch there is no problem with openvpn. When you try to access your site, webserver see your real IP because you're connected to the same server with OpenVPN. So don't worry about this, the traffic still routed and encrypted.

  • budi1413budi1413 Member
    edited December 2013

    Try open http://ipleak.net after connected to vpn server. :D

  • @budi1413 said:
    Try open http://ipleak.com after connected to vpn server. :D

    You landed on ipleak.com
    This page is parked FREE, courtesy of ...

    Cool.

  • @alexvolk said:
    Cool.

    Ah sorry it supposedly .net. :)

  • @cosmicgate said:
    easy way: configure it on access page

    longer or more troublesome way: set up vpn on another vps. access web resources from the other vpn.

    So how do I do this in the access panel?

  • MakenaiMakenai Member
    edited December 2013

    What about using the OpenVPN servers internal IP? Isn't it normal for it to not route the traffic to the VPN itself via the VPN. If it did that it would just always get "Destination unreachable". Someone please correct me if I'm wrong.

Sign In or Register to comment.