S
S
Sergey2021-09-05 16:28:32
linux
Sergey, 2021-09-05 16:28:32

How to set up internet access via openvpn?

I can not configure a subject in any way.
There is a server with openvpn. It has ssh access. UFW not installed, iptables not installed
VPN works, my PC gets address 10.8.0.4 , server IP 10.8.0.1 Pings
from server 8.8.8.8, not from my local PC.
ifconfig:

ifconfig 
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.8.0.1  netmask 255.255.255.0  destination 10.8.0.1

venet0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP>  mtu 1500
        inet 127.0.0.1  netmask 255.255.255.255  broadcast 0.0.0.0  destination 127.0.0.1

venet0:0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP>  mtu 1500
        inet 10.10.13.16  netmask 255.255.255.255  broadcast 10.10.13.16  destination 10.10.13.16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 0  (UNSPEC)


route
ip route
default dev venet0 scope link 
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1


At 10.10.13.16 gate 10.0.0.0
Tried to add routes. ip forwarding is enabled.
cat /proc/sys/net/ipv4/ip_forward
1


Please help, thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Dmitriev, 2021-09-05
@SignFinder

Firewall - SNAT and FORWARD need to be opened. And it was necessary to start with a search in Google and here.
And in the Openvpn server settings, enable the option that will change the default route in the system with the client to a VPN connection.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question