[Solved] Windows Server 2012/Windows 10: Send all internet through VPN fails

Samples of working configurations.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Locked
rebuhleiv
OpenVpn Newbie
Posts: 3
Joined: Wed Nov 16, 2016 9:06 pm

[Solved] Windows Server 2012/Windows 10: Send all internet through VPN fails

Post by rebuhleiv » Wed Nov 16, 2016 9:11 pm

Hello!

If I connect through the VPN software, everything works fine and it connected.
If I add the push gateway directives in order to send all internet traffic through the VPN,
I can again connect but internet is not available. What am I doing wrong?

On the server side I have the following environment:

Windows Server 2012
Router: FritzBox
IP of Server: 192.168.178.22
Public IP of Server: 1.2.3.4 (example)
IP of Router: 192.168.178.1
DNS: 192.168.178.1

On the client side I have the following environment:

Windows 10 Pro
Router: FritzBox
IP of Client: 192.168.200.20
IP of Router: 192.168.200.1
DNS: 192.168.200.1

Here are my configuration files:
server.ovpn
local 192.168.178.22
port 1194
proto udp
dev tun

# certs
dh "C:\\Program Files\\OpenVPN\\server-keys\\dh1024.pem"
ca "C:\\Program Files\\OpenVPN\\server-keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\server-keys\\server.crt"
key "C:\\Program Files\\OpenVPN\\server-keys\\server.key"

# server setup
server 10.19.15.0 255.255.255.0
ifconfig-pool-persist "C:\\Program Files\\OpenVPN\\ipp.txt"
client-to-client

# client setup
client-config-dir "C:\\Program Files\\OpenVPN\\ccd"
push "route 192.168.178.0 255.255.255.0"
push "redirect-gateway"
push "dhcp-option DNS 192.168.178.1"

# defaults
keepalive 10 120
comp-lzo
persist-key
persist-tun

# logs
status "C:\\Program Files\\OpenVPN\\log\\openvpn-status.log"
log "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
log-append "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 3
client.ovpn
client
dev tun

proto udp
remote 1.2.3.4 1194
pull
resolv-retry infinite
nobind
persist-key
persist-tun

ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\client01.crt"
key "C:\\Program Files\\OpenVPN\\config\\client01.key"

comp-lzo
verb 3

TinCanTech
OpenVPN Protagonist
Posts: 11138
Joined: Fri Jun 03, 2016 1:17 pm

Re: Windows Server 2012/Windows 10: Send all internet through VPN fails

Post by TinCanTech » Wed Nov 16, 2016 10:40 pm

Have you enabled IP Routing on your server ?

See this board for more info:
viewforum.php?f=7

rebuhleiv
OpenVpn Newbie
Posts: 3
Joined: Wed Nov 16, 2016 9:06 pm

Re: Windows Server 2012/Windows 10: Send all internet through VPN fails

Post by rebuhleiv » Thu Nov 17, 2016 12:34 am

Hello!

Thank you very much, this thread was the solution:
viewtopic.php?f=7&t=7806
I wonder why nowhere else I haven't found this informations.

Now it works like a charm.

Thanks again!

TinCanTech
OpenVPN Protagonist
Posts: 11138
Joined: Fri Jun 03, 2016 1:17 pm

Re: Windows Server 2012/Windows 10: Send all internet through VPN fails

Post by TinCanTech » Thu Nov 17, 2016 1:18 am

rebuhleiv wrote:Now it works like a charm
Excellent news 8-)
rebuhleiv wrote:I wonder why nowhere else I haven't found this informations
Google foo ?
rebuhleiv wrote:this thread was the solution
Windows 7 as OpenVPN server with redirect-gateway

Thanks for letting us know that Bebop's post is still very helpful.

Locked