How to access internal network using my own domain? (Please read)
-
After I installed PfSense and everything was working I enabled PureNAT, the DNS Resolver and it worked, I could access mydomain.com (or exertnal ip) from inside my network, but then I added a second interface "LAN2" (with DHCP server, all working), added a OpenVpn client, created another interface using this OpenVpn client, created a gateway for this OpenVpn interface and then under Firewall => Outbound I changed the rule (for LAN2 interface) WAN 192.168.2.0/24 ... to OpenVpn 192.168.2.0/24 ..., I also changed in Firewall => Rules => LAN to use my WAN_Gateway and now I have both interfaces working (LAN with the "regular" connection, straight to the ISP and the LAN2 interface wich traffic goes trought PIA) but I cannot access mydomain.com from inside my network (on LAN).
Tl;Dr:
My firewall has 3 interfaces:
WAN (Isp external IP, PPPoE)
LAN (192.168.0.1/24 w/DHCP) goes straight to WAN
LAN2 (192.168.0.2/24 w/DHCP) goes to PIA VPN insteadBefore enabling the OpenVPn client, I could access mydomain.com from inside LAN, now I can't, PureNAT is enabled and also is DNS Resolver
**Edit:**What I'm trying to access is my server that is inside LAN (e.g.: 192.168.1.5), I already created a NAT rule and I can access it from outside without any issues
-
Turn off pulling routes in your vpn client... You do not want everything in pfsense to go out to your vpn.. You want to policy route.
Also you shouldn't expecting nat reflection for you to get to your local stuff, setup host override(s) that that your public fqdn resolve to your local IP for that machine so your not having to nat reflect.
-
@johnpoz said in How to access internal network using my own domain? (Please read):
Turn off pulling routes in your vpn client... You do not want everything in pfsense to go out to your vpn.. You want to policy route.
Also you shouldn't expecting nat reflection for you to get to your local stuff, setup host override(s) that that your public fqdn resolve to your local IP for that machine so your not having to nat reflect.
So, I should check the "Don't pull routes" option in the OpenVpn Client and add a Host Override on Dns Resolver, correct?
-
@johnpoz Thak you very much! After doing this and replacing PureNAT with Nat + Proxy it's now finally working
-
You don't need proxy+nat if your using host override. You don't need any nat reflection!