Control Access to Site-to-Site VPN Tunnel [Solved]
Posted: Sun Dec 20, 2015 11:47 pm
I have a mikrotik 493 that establishes a site-to-site tunnel with another appliance.
The mikrotik 493:
Remote Appliance:
This is what my mikrotik ipsec config looks like:
This effectively establishes my site-to-site tunnel, and forces anyone behind my mikrotik router to connect over the VPN tunnel.
My problem is this: I need to be able to control what traffic is allowed to go out the tunnel, and what traffic goes out to the internet without going through the tunnel.
Ex based on source IP: If the source IP is 192.168.1.50, send its traffic through the VPN tunnel - otherwise, send it directly to the internet.
Ex based on dst IP: If the destination IP is 172.16.16.1, send the traffic through the VPN tunnel - otherwise, send it directly to the internet.
Either method should work for me.
I tried replacing 0.0.0.0/0 in my ipsec policy with 172.16.16.1/32, but when I do, the ipsec tunnel can no longer get established.
What am I missing?
The mikrotik 493:
Code: Select all
Public IP: 10.10.10.10
LAN IP: 192.168.1.1.24
Code: Select all
Public IP: 11.11.11.11
LAN IP: 172.16.16.1/24
Code: Select all
/ip ipsec proposal
add name=My_Prop auth-algorithms=md5 enc-algorithms=3des disabled=no
/ip ipsec peer
add address=11.11.11.11/32 enc-algorithm=3des hash-algorithm=md5 nat-traversal=no secret=my_pass
/ip ipsec policy
add dst-address=0.0.0.0/0 sa-dst-address=11.11.11.11 sa-src-address=10.10.10.10 src-address=10.10.10.10/32 tunnel=yes proposal=My_Prop
My problem is this: I need to be able to control what traffic is allowed to go out the tunnel, and what traffic goes out to the internet without going through the tunnel.
Ex based on source IP: If the source IP is 192.168.1.50, send its traffic through the VPN tunnel - otherwise, send it directly to the internet.
Ex based on dst IP: If the destination IP is 172.16.16.1, send the traffic through the VPN tunnel - otherwise, send it directly to the internet.
Either method should work for me.
I tried replacing 0.0.0.0/0 in my ipsec policy with 172.16.16.1/32, but when I do, the ipsec tunnel can no longer get established.
What am I missing?