I got openvpn tunnel setup and working. I can connect and dhcp works, everything is assigned correctly. I can ping and ssh into the server, but cannot access the internet. No traffic goes out. I assume I have an issue with iptables, I am running debian on the server. My iptables is configured as follows
iptables -t nat -A POSTROUTING -s 10.192.168.0/24 -o venet0 -j MASQUERADE
iptables -F FORWARD
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.192.168.0/24 -j ACCEPT
iptables -A FORWARD -j DROP
Anything obviously wrong or missing?
Vpn works no internet acess
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 Newbie
- Posts: 2
- Joined: Wed Aug 16, 2017 5:29 pm
Re: Vpn works no internet acess
Hi.
I can't really tell you what to do. I am actually having probably some of the same issue, but I felt it is dumb to add another thread with the exact same thing?
Anyway, I have a Windows 10 computer running the OVPN Server behind a Mikrotik Router. I can ping the server at 10.8.0.1 and I can VNC into it. But I don't get an internet connection, and I cannot ping the server LAN side or anything but the server IP itself. I've tried a bunch of guides without any luck. I've forwarded the port 1194 to the correct LAN address through the router. I've created a static route from server IP range to LAN IP range. I've enabled IP forwarding on the Windows 10 machine, and I have disabled firewall for the TAP Adapter. I am really scratching my head now.
Server settings:
port 1194
proto udp
dev tun
ca "C:\\Programfiler\\OpenVPN\\config\\ca.crt"
cert "C:\\Programfiler\\OpenVPN\\config\\server.crt"
key "C:\\Programfiler\\OpenVPN\\config\\server.key" # This file should be kept secret
dh "C:\\Programfiler\\OpenVPN\\config\\dh4096.pem"
topology subnet
server 10.8.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 192.168.1.1"
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
Client Settings:
client
dev tun
proto udp
remote XX.XXX.XX.XXX 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\Client.crt"
key "C:\\Program Files\\OpenVPN\\config\\Client.key"
remote-cert-tls server
cipher AES-256-CBC
verb 3
I can't really tell you what to do. I am actually having probably some of the same issue, but I felt it is dumb to add another thread with the exact same thing?
Anyway, I have a Windows 10 computer running the OVPN Server behind a Mikrotik Router. I can ping the server at 10.8.0.1 and I can VNC into it. But I don't get an internet connection, and I cannot ping the server LAN side or anything but the server IP itself. I've tried a bunch of guides without any luck. I've forwarded the port 1194 to the correct LAN address through the router. I've created a static route from server IP range to LAN IP range. I've enabled IP forwarding on the Windows 10 machine, and I have disabled firewall for the TAP Adapter. I am really scratching my head now.
Server settings:
port 1194
proto udp
dev tun
ca "C:\\Programfiler\\OpenVPN\\config\\ca.crt"
cert "C:\\Programfiler\\OpenVPN\\config\\server.crt"
key "C:\\Programfiler\\OpenVPN\\config\\server.key" # This file should be kept secret
dh "C:\\Programfiler\\OpenVPN\\config\\dh4096.pem"
topology subnet
server 10.8.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 192.168.1.1"
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
Client Settings:
client
dev tun
proto udp
remote XX.XXX.XX.XXX 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\Client.crt"
key "C:\\Program Files\\OpenVPN\\config\\Client.key"
remote-cert-tls server
cipher AES-256-CBC
verb 3
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Aug 16, 2017 5:29 pm
Re: Vpn works no internet acess
Ok, I figured it out on my server. It turns out I had enabled IP forwarding on my Win10 machine, but I hadn't rebooted it afterwards. So a simple reboot fixed the problem...
-
- OpenVpn Newbie
- Posts: 4
- Joined: Sat Aug 12, 2017 8:29 pm
Re: Vpn works no internet acess
I figured mine out as well. vnet0 was in the guide but after looking, my server wasn't virtualized that way, it was just eth0. Now if can just get upnp to work I will be in business.