One VPS ubuntu two IPs. Client connection openvpn to a VPN service elsewhere. Connects OK.
I want to use second IP for VPN connection, leaving first IP and its routing alone. So
1.2.3.4 has default route to internet and must stay. Used for ordinary VPS roles such as email and web pages
5.6.7.8 has new default route via VPN for all exits used for things like TOR.
Services bound/listening to 5.6.7.8 send data via VPN (eg TOR)
I assume at the very least I will have to configure iproute2. Already added to the .ovpn file to route-noexec or the VPN server would push a whole system default route cutting me off from the server. I needed to get control of the routing. Currently the VPN server gives a dynamic IP with each connection to add to the complications of such a setup. It connects but no routes as yet.
Has anyone done this? Attach open VPN client connection to one of two IP and only route traffic of second IP via the VPN? Is there a HOWTO? !
Gerry
One PC Two IPs: Use one for VPN client route
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Jun 15, 2016 7:04 am
-
- OpenVpn Newbie
- Posts: 12
- Joined: Thu Jul 21, 2016 10:40 pm
Re: One PC Two IPs: Use one for VPN client route
I've been trying to do this on my Windows Box and have been pulling my hair out.
I was told the best way to do this is to bridge the 2nd NIC with the TAP adapter. I've been trying to configure it, but I can't get it to work.
viewtopic.php?f=15&t=22144
I was told the best way to do this is to bridge the 2nd NIC with the TAP adapter. I've been trying to configure it, but I can't get it to work.
viewtopic.php?f=15&t=22144
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Jun 15, 2016 7:04 am
Re: One PC Two IPs: Use one for VPN client route
I am trying on Ubuntu
On Windows is seemed easier, but do not have a machine to remember how! In Remote and Routing, under NAT set rules for each IP.
Then set open VPN to use the second IP. I moved to Softethervpn for many uses as it could get out through any firewall and the server is compatible with openvpn, and easier to configure.
On Windows is seemed easier, but do not have a machine to remember how! In Remote and Routing, under NAT set rules for each IP.
Then set open VPN to use the second IP. I moved to Softethervpn for many uses as it could get out through any firewall and the server is compatible with openvpn, and easier to configure.
-
- OpenVpn Newbie
- Posts: 12
- Joined: Thu Jul 21, 2016 10:40 pm
Re: One PC Two IPs: Use one for VPN client route
Are you talking on the client machine, or in the router?Gerryb wrote:I am trying on Ubuntu
On Windows is seemed easier, but do not have a machine to remember how! In Remote and Routing, under NAT set rules for each IP.
Then set open VPN to use the second IP. I moved to Softethervpn for many uses as it could get out through any firewall and the server is compatible with openvpn, and easier to configure.
-
- OpenVPN Super User
- Posts: 310
- Joined: Tue Apr 12, 2011 6:22 am
Re: One PC Two IPs: Use one for VPN client route
something similar has been discussed here viewtopic.php?f=15&t=19200
basically you need to setup policy routing
basically you need to setup policy routing