Hi all, I am often connecting to my router from the remote site via L2TP with IPsec VPN. I can connect access everything on my network except the router, so I looked into firewall rules to troubleshoot.
Initially I added my l2tp connection to LAN address list and it worked fine-I could access the router; however it is dynamic interface so when I disconnect from the VPN it changes to "unknown" and the problem starts all over again.
Earlier I created a rule to accept traffic dst port 500, 4500 and 1701 which allows me to connect via L2TP, but there is a rule "drop all not coming from LAN" that is preventing me from accessing the router remotely. I don't really understand why? default gateway IP 192.168.1.1, remote IP when connected via VPN 192.168.1.2. It's /24 network so I am on the same subset.
So to resolve a problem I placed another rule above to accept all PPP connections, which also works fine - I can access the router now but I don't see an option to change "ppp" conections to "l2tp" only. So my question is, how to modify my firewall to allow only l2tp VPN connections without losing an ability to access the router remotely?
firewall:
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input comment="ACCEPT ALL PPP CONNECTIONS" in-interface=all-ppp
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
Initially I added my l2tp connection to LAN address list and it worked fine-I could access the router; however it is dynamic interface so when I disconnect from the VPN it changes to "unknown" and the problem starts all over again.
Earlier I created a rule to accept traffic dst port 500, 4500 and 1701 which allows me to connect via L2TP, but there is a rule "drop all not coming from LAN" that is preventing me from accessing the router remotely. I don't really understand why? default gateway IP 192.168.1.1, remote IP when connected via VPN 192.168.1.2. It's /24 network so I am on the same subset.
So to resolve a problem I placed another rule above to accept all PPP connections, which also works fine - I can access the router now but I don't see an option to change "ppp" conections to "l2tp" only. So my question is, how to modify my firewall to allow only l2tp VPN connections without losing an ability to access the router remotely?
firewall:
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input comment="ACCEPT ALL PPP CONNECTIONS" in-interface=all-ppp
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
Statistics: Posted by rutinoscorbin — Sat Jan 13, 2024 8:18 pm