i will like to only allow vpn traffic to be routed via the openvpn connection and NOT route all internet traffic. What steps do i need to take to achieve this?
Thanks!
restrict vpn traffic only, currently all internet traffic routed
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.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVPN User
- Posts: 26
- Joined: Tue Jul 13, 2021 10:23 am
-
- OpenVpn Newbie
- Posts: 4
- Joined: Wed Aug 30, 2017 9:27 am
Re: restrict vpn traffic only, currently all internet traffic routed
check this line in you server.conf
push "redirect-gateway def1 bypass-dhcp"
push "redirect-gateway def1 bypass-dhcp"
-
- OpenVPN User
- Posts: 26
- Joined: Tue Jul 13, 2021 10:23 am
Re: restrict vpn traffic only, currently all internet traffic routed
hi thanks for the reply...
this line push "redirect-gateway def1 bypass-dhcp" is added in server.conf file
this line push "redirect-gateway def1 bypass-dhcp" is added in server.conf file
-
- OpenVpn Newbie
- Posts: 4
- Joined: Wed Aug 30, 2017 9:27 am
Re: restrict vpn traffic only, currently all internet traffic routed
if you want all traffic,need add this : push "redirect-gateway def1 bypass-dhcp"kashyap009 wrote: ↑Fri Jul 23, 2021 12:42 pmhi thanks for the reply...
this line push "redirect-gateway def1 bypass-dhcp" is added in server.conf file
if you want part of traffic,comment this line like this : ; push "redirect-gateway def1 bypass-dhcp"
and add push "route xxx xxxx"
-
- OpenVPN User
- Posts: 26
- Joined: Tue Jul 13, 2021 10:23 am
Re: restrict vpn traffic only, currently all internet traffic routed
push route xxx.xxx will be my local internet gateway 192.168.xx.xxx?
-
- OpenVPN User
- Posts: 26
- Joined: Tue Jul 13, 2021 10:23 am
Re: restrict vpn traffic only, currently all internet traffic routed
could you pls elloborate more on push route.....
thanks in advance
thanks in advance