IPsec Mobile Client with EAP-MASCHAPv2 (Windows 10 built-in VPN Client)

Started by ntkevinshao, July 26, 2022, 05:00:06 AM

Previous topic - Next topic
Dear all :
(1) OPNsense 22.1.10 VMware VM running on PC 1
     NIC 1(LAN) : host only with IP address is static 192.168.1.1 /24
     NIC 2(WAN) : bridged to PC1's Ethernet adapter with DHCP IP 10.0.1.127 /22
     IPsec Mobile Client related setting :
        CA and Certificates were correctly generated
        Backend for Authentication is set to "Local Database"
        Client IP address pool : 10.10.0.0 /24
        IPsec Tunnel Phase 2 Local Network is set to "LAN subnet"
        user correctly configured under Pre-Shared Keys menu with Type "EAP"
     OPNsense Firewall Rules are set to allow all on WAN, LAN and IPsec interface
(2) PC 2(Windows 10) DHCP IP 10.0.1.241 used for IPsec Mobile Client test using Windows 10's built-in VPN client connection

My problems :
1. PC2 using Windows 10 VPN client can successfully login and connect to OPNsense  and get IP address 10.10.0.1 /32, is this normal ? I assume PC2 should get 10.10.0.1 /24
2. PC2 cannot access OPnsense LAN Subnet, ping 192.168.1.1 failed. I checked PC2's route table, there was no route to 192.168.1.0/24 added
     

My bad, I found out why ? I forgot to check Install Policy in Tunnel Phase 1 Configuration
Now PC2 can ping 192.168.1.1 but cannot ping 8.8.8.8, how can I do split tunneling so only traffic to 192.168.1.0/24 is routed over IPsec tunnel, all other traffic is routed over PC2's existing default gateway ?
Now I check PC2's route table default route 0.0.0.0/0 next hop is set to 10.10.0.1 tunnel interface, this is not what I want. What I want is I should have 192.168.1.0/24 net hop 10.10.0.1 installed in PC2's route table.     




Thanks, it worked. Now my remote win 10 PC VPN connection is up and default gateway is its original default gateway not the IPsec tunnel.
But I got another problem, that is my win 10 PC did not learn route to OPNsense LAN subnet via this tunnel interface, did I miss still anything ?