Attempting to tunnel all client traffic thru server

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
theman00011
OpenVpn Newbie
Posts: 1
Joined: Mon Jun 22, 2015 11:50 pm

Attempting to tunnel all client traffic thru server

Post by theman00011 » Tue Jun 23, 2015 12:24 am

Just as a preface, I am not extremely experienced with VPN networking in general, despite being in networking classes so bear with me when trying to figure this out.

So as of right now I (finally) have a single Windows client connecting to a single Windows OpenVPN server. This works but 1. The client still uses the same external network IP address when browsing 2. LAN traffic is inaccessible (This is less on an issue right now, and can wait until later.)

As I understand, I need to put

Code: Select all

push "redirect-gateway def1"
in the server configuration. Is this correct? There seems to be so many ways to accomplish this that I am completely lost. e.g ethernet bridging, TUN/TAP, etc.

Client (Physical Adapter: internet | TUN/TAP: 10.8.0.6) -----> Home router (WAN: internet | LAN: 192.168.1.1/24) -------> OpenVPN Server (LAN: 192.168.1.35/24 | TUN/TAP: 10.8.0.1)

The configs are pretty default but I can post any of them you need, just let me know. Any help figuring out how to tunnel the traffic correctly would be a great help.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Attempting to tunnel all client traffic thru server

Post by Traffic » Tue Jun 23, 2015 10:03 am

theman00011 wrote:I (finally) have a single Windows client connecting to a single Windows OpenVPN server. This works
OK
theman00011 wrote:LAN traffic is inaccessible
See this HOWTO:
HOWTO: Expanding the scope of the VPN to include additional machines
theman00011 wrote:I need to put
Code:
push "redirect-gateway def1"
in the server configuration
See this HOWTO:
HOWTO: Routing all client traffic (including web-traffic) through the VPN

As your server is windows you are going to have some difficulty. You are either going to need to use the "NATHack" solution or static routes on your LAN router.
theman00011 wrote:Client (Physical Adapter: internet | TUN/TAP: 10.8.0.6) -----> Home router (WAN: internet | LAN: 192.168.1.1/24) -------> OpenVPN Server (LAN: 192.168.1.35/24 | TUN/TAP: 10.8.0.1)
  • NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Unless you have a specific reason do not use TAP/Bridge just use the standard TUN/route method.

Post Reply