Page 1 of 1

Letting client access greater internet over vpn

Posted: Tue Dec 07, 2021 2:08 am
by polarbub
I want my client to be able to access the internet outside of the vpn subnet.

I have this server config file https://pastebin.com/9RVWrCKE

And this client one https://pastebin.com/38NrZxBK The certificates and real IP address of the server have been removed.

I can ping at its local network IP address

Code: Select all

ping 10.1.1.4
via

Code: Select all

push "route 10.1.1.0 255.255.255.0"
and I believe that this also allows me to access anything else on that network. I don't have anything else on that network to test with though. I would like to be able to something similar for the whole internet but adding something like

Code: Select all

push "route 8.8.8.0 255.255.255.0"
to let me access 8.8.8.8 but it doesn't let me get though.

I have turned on IP forwarding though

Code: Select all

net.ipv4.ip_forward=1
in

Code: Select all

/etc/sysctl.conf
and reloaded it with

Code: Select all

sysctl -p
Looking at viewtopic.php?f=6&t=10923 I am at 'Is NAT enabled on the VPN subnet?' but there is no reference on how to check and enable it so I am stuck there.

Any help would be greatly appreciated, Thanks :)

Re: Letting client access greater internet over vpn

Posted: Tue Dec 07, 2021 3:09 am
by TinCanTech
polarbub wrote:
Tue Dec 07, 2021 2:08 am
I would like to be able to something similar for the whole internet but adding something like

Code: Select all

push "route 8.8.8.0 255.255.255.0"
to let me access 8.8.8.8 but it doesn't let me get though.
See --redirect-gateway in the manual.

There is also a section in the howto.

Re: Letting client access greater internet over vpn

Posted: Sat Dec 18, 2021 2:31 am
by polarbub
I already have

Code: Select all

push "redirect-gateway def1 bypass-dhcp"
in my server config. Do I need to use something different? Also can I have a link to the specific howto page please?