Hi,
I have setup OpenVPN on my workplace server. I can successfully access webservices and shared folders (windows) over VPN.
One of the programs I use for work need to access a specific server that can only be accessed from my office's IP address. I have determined destination IP address using WireShark program.
Can I setup OpenVPN in a way that, requests going for aforementioned server routed over openVPN?
I don't want to route all my internet traffic over vpn if possible,
Thanks in advance
Routing specific IP's over VPN
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Tue Feb 09, 2021 8:09 pm
-
- OpenVPN Super User
- Posts: 463
- Joined: Tue May 01, 2012 9:30 pm
Re: Routing specific IP's over VPN
Yes you can route only network you like and the rest go to your local network.on you client open it and add this one.
route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway
This part is use your local network .if you need route some network over vpn you can do this .
67.98.89.76 255.255.255.252 67.98.89.70
route 67.98.89.76 255.255.255.252 vpn _gateway
vpn_gateway must be lease it like that so openvpn can add gareway on fly. Just correct ip and subnet you want to route only.
route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway
This part is use your local network .if you need route some network over vpn you can do this .
67.98.89.76 255.255.255.252 67.98.89.70
route 67.98.89.76 255.255.255.252 vpn _gateway
vpn_gateway must be lease it like that so openvpn can add gareway on fly. Just correct ip and subnet you want to route only.