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
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
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