Hi everyone, I'm trying to build my private VPN and I'm able to connect to my server, but unfortunately I'm not able to access the internet.
In the following the server configuration:
port 7125
#proto tcp
proto udp
dev tun
#dev tap0
ca XXXX/ca.crt
cert XXXX/pii-server.crt
key XXXX/pi-server.key
dh XXXX/dh.pem
server 10.8.0.0 255.255.255.0
push "route 192.168.178.0 255.255.255.0"
push "route 10.8.0.1 255.255.255.255"
push "route 10.8.0.0 255.255.255.0"
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
duplicate-cn
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-D$
auth SHA512
auth-nocache
keepalive 20 60
persist-key
persist-tun
compress lz4-v2
client-to-client
daemon
user nobody
group nogroup
log-append /var/log/openvpn.log
verb 3
management localhost 7505
In the following the clinet conf:
client
dev tun
proto udp
remote XXXX 7125
ca ca.crt
cert client_smartphone.crt
key client_smartphone.key
cipher AES-256-CBC
auth SHA512
auth-nocache
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-D$
resolv-retry infinite
compress lz4
nobind
persist-key
persist-tun
mute-replay-warnings
verb 3
In the following the output from netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default fritz.box 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
This is the output from iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i tun+ -j ACCEPT
-A INPUT -i eth0 -p udp -m state --state NEW -m udp --dport 7125 -j ACCEPT
-A INPUT -i tun+ -j ACCEPT
-A FORWARD -i tun+ -j ACCEPT
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i tun+ -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o tun+ -j ACCEPT
-A OUTPUT -o tun+ -j ACCEPT
Could you please help me?
Thanks