Final Goal:
Able to connect to OpenVPN server and able to access internet with Windows Firewall enabled with proper rules.
Server specification:
Windows Server R2 2012, RRAS NOT installed.
The server is running in VM with bridge mode, which has a public IP on it. There is no other firewall beside Windows Firewall on server side.
I have already follow this:
https://forums.openvpn.net/topic7806.html with my IP forwarding.
Config file:
Server:
local a.b.c.d
port 17283
proto udp
dev tun
server 10.8.0.0 255.255.255.0
ca ca.crt
cert Server.crt
key Server.key # This file should be kept secret
dh dh2048.pem
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
#the following commands are optional
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
Client:
client
dev tun
proto udp
remote a.b.c.d 17283
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert clients.crt
key clients.key
remote-cert-tls server
comp-lzo
verb 3
Windows Firewall Specification (Server):
1. Removed all predefined rules
2. Add and allow UDP port 17283 for incoming connections
Basically, beside port 17283 is reachable, everything else just dropping package.
Default incoming connection is block, default outgoing connection is allow. Using public profile
Observations:
1. With above firewall rules: The client is able to connect to server, but no internet access. <- This is the goal, need to make client able to access internet with firewall enabled.
2. If completely disable the firewall or allow incoming connection by default and WITHOUT restarting VPN service, the client still have no internet access.
3. If completely disable the firewall or allow incoming connection by default and RESTARTED VPN service, then the client have internet access.
4. If enable the firewall again with above rule and WITHOUT restarting VPN service, the client still have internet access.
5. If enable the firewall again with above rule and RESTARTED VPN service, then the client have no internet access again.
Any thoughts for this problem? Thanks for helping.