Host exceptions in client config to bypass VPN
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 5
- Joined: Mon Sep 29, 2014 4:17 pm
Host exceptions in client config to bypass VPN
Hi there,
I am using a VPN provider which blocks sending emails via the VPN connection. Therefor, I would like to directly contact my email server, thereby bypassing openvpn.
Is it possible to add a list of a few exempted servers in the config file? What is the command syntax, if there is any?
Thanks
I am using a VPN provider which blocks sending emails via the VPN connection. Therefor, I would like to directly contact my email server, thereby bypassing openvpn.
Is it possible to add a list of a few exempted servers in the config file? What is the command syntax, if there is any?
Thanks
Last edited by debbie10t on Tue Oct 21, 2014 12:01 pm, edited 1 time in total.
Reason: Title clarity
Reason: Title clarity
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Host exceptions in client config to bypass VPN
To have a certain host address bypass your VPN add this to the client config:Where:
Code: Select all
route host-ip-address-A 255.255.255.255 local-real-ip-address-B
- host-ip-address-A: is the ip address of the host you want to contact directly
- local-real-ip-address-B: is the real IP address of your computer (not the VPN address)
-
- OpenVpn Newbie
- Posts: 5
- Joined: Mon Sep 29, 2014 4:17 pm
Re: Host exceptions in client config to bypass VPN
Ok, thank you very much, will try!
-
- OpenVpn Newbie
- Posts: 5
- Joined: Mon Sep 29, 2014 4:17 pm
Re: Host exceptions in client config to bypass VPN
Well, unfortunately
route mail.gmx.net 255.255.255.255 192.168.110.20
does not work.
route mail.gmx.net 255.255.255.255 192.168.110.20
does not work.
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Host exceptions in client config to bypass VPN
You cannot add routes by DNS name ..
Traffic wrote:Where:
host-ip-address-A: is the ip address of the host you want to contact directly
-
- OpenVpn Newbie
- Posts: 5
- Joined: Mon Sep 29, 2014 4:17 pm
Re: Host exceptions in client config to bypass VPN
Well, i looked up the man an it says:
--route network/IP [netmask] [gateway] [metric]
Add route to routing table after connection is established. Multiple routes can be specified. Routes will be automatically torn down in reverse order prior to TUN/TAP device close.
This option is intended as a convenience proxy for the route(8) shell command, while at the same time providing portable semantics across OpenVPN's platform space.
netmask default -- 255.255.255.255
gateway default -- taken from --route-gateway or the second parameter to --ifconfig when --dev tun is specified.
The default can be specified by leaving an option blank or setting it to "default".
The network and gateway parameters can also be specified as a DNS or /etc/hosts file resolvable name
but it didn't work, so maybe you are right. You said [gateway] was my local IP, is that the IP of my computer in the LAN or doesn't gateway rather refer to the router?
--route network/IP [netmask] [gateway] [metric]
Add route to routing table after connection is established. Multiple routes can be specified. Routes will be automatically torn down in reverse order prior to TUN/TAP device close.
This option is intended as a convenience proxy for the route(8) shell command, while at the same time providing portable semantics across OpenVPN's platform space.
netmask default -- 255.255.255.255
gateway default -- taken from --route-gateway or the second parameter to --ifconfig when --dev tun is specified.
The default can be specified by leaving an option blank or setting it to "default".
The network and gateway parameters can also be specified as a DNS or /etc/hosts file resolvable name
but it didn't work, so maybe you are right. You said [gateway] was my local IP, is that the IP of my computer in the LAN or doesn't gateway rather refer to the router?
-
- OpenVpn Newbie
- Posts: 5
- Joined: Mon Sep 29, 2014 4:17 pm
Re: Host exceptions in client config to bypass VPN
I does work:
route mail.gmx.net 255.255.255.255 LAN-IP-of-the-router
Thanks!
route mail.gmx.net 255.255.255.255 LAN-IP-of-the-router
Thanks!
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Host exceptions in client config to bypass VPN
This is considered to be a security risc .. but it's up to you how you manage your network.volher wrote:route mail.gmx.net
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Host exceptions in client config to bypass VPN
volher wrote:You said [gateway] was my local IP, is that the IP of my computer in the LAN or doesn't gateway rather refer to the router?
Yes, you are right .. that should be the local-real-ip-address-of-gateway of your LAN (not the VPN address).Traffic wrote:local-real-ip-address-B: is the real IP address of your computer (not the VPN address)