Here's what may be an issue. Imagine you have following network:
address pool: 10.1.1.0/255.255.255.0
router: 10.1.1.1
internal interface on internal vpn server: 10.1.1.2
some external machine that VPNs to network: 10.2.2.2
some internal client machine: 10.1.1.90
When you trying to access SIC from external VPN box, then traffic route goes like this:
- 10.2.2.2
- vpn (internet)
- 10.1.1.2
- 10.1.1.90
- OK
Seems fine, HOWEVER, in order for traffic to flow, the 10.1.1.90 machine should be able to respond and that means that packets from it must be routable to 10.2.2.2 too. Internal client has obviously ip: 10.1.1.90, mask: 255.255.255.0 and router: 10.1.1.90. Therefore, packets would be routed like this:
- 10.1.1.90
- 10.1.1.1 (sine it is router, and 10.2.2.2 is not directly addressable)
- internet
- NOT FOUND
Basically, reply packets will not even reach VPN. What can you do? Obviously, what will work is to add route to internal client to route all packets to 10.2.2.2 not to VPN box instead of router, such as (Windows box):
route add 10.2.2.0 mask 255.255.255.0 10.1.1.2
this will resolve the problem on single-machine level. Reply packets will go:
- 10.1.1.90
- 10.1.1.2 (explicit route)
- vpn (internet)
- 10.2.2.2
To resolve issue on the network level, you must modify router in a same matter to redirect all traffic going to 10.2.2.0 to 10.1.1.2. This way reply packet will go:
- 10.1.1.90
- 10.1.1.1
- 10.1.1.2
- vpn (internet)
- 10.2.2.2
Another solution is: make your VPN box to NAT on 10.1.1.2 interface. This way for internal machines it will look as if all the traffic originates from 10.1.1.2, and replies will go to 10.1.1.2. I would advise to go through routing though, since NAT will require additional resources on VPN box for connection tracker
Hmm, since the two subnets are masked and cannot really communicate, I would do a NAT on both routers, then ping will work. So you have to NAT the networks.
Best Answer
Once you have created the tunnel, you will get a new interface, for which you can create custom rules. If no rules are set, pfSense will block any traffic. As such you need to specifically allow certain devices. Create an alias for the VPN network (172.16..) on Router 1, and another one for the allowed clients.
On router 2, under rules, in the tunnel interface, allow traffic from the VPN network to the whitelisted clients. On the LAN interface, allow traffic from the whitelisted clients to the VPN network.