Route all traffic

This forum is for admins who are looking to build or expand their OpenVPN setup.

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
avyannz
OpenVpn Newbie
Posts: 1
Joined: Thu Mar 17, 2022 8:41 am

Route all traffic

Post by avyannz » Thu Mar 17, 2022 8:51 am

Hi everyone, sorry for being a noob, I am sure this has been asked so many time. I would like my client to use all traffic from the VPN server.

I am setting a server in the office (window 10), the server setting as below:

---------------------------------------------------------
port 1194
proto udp
dev tun

ca ca.crt
cert server.crt
key server.key
dh dh.pem

server 10.50.8.0 255.255.255.0
ifconfig-pool-persist ipp.txt

push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"

keepalive 10 120

persist-key
persist-tun
---------------------------------------------------------

I know I have to put push "redirect-gateway def1" into config to make it works. And I know I am missing some settings in my server or server's router to teach the server to handle client's traffic? Adding a route or NATing or something like this? But I do not know how to do it.

Currently, I have to manually share my internet traffic in (Window's Network connection > Internet connection sharing) to the VPN's adapter. I know this is not the proper way to do.

Would anyone help? Thanks a lot!

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route all traffic

Post by TinCanTech » Thu Mar 17, 2022 2:03 pm


Post Reply