defconf: drop all not coming from LAN really needed?
Posted: Sun Sep 23, 2018 5:08 am
Hi! I had to disable "defconf: drop all not coming from LAN" otherwise my local CAPs Manager would not work. Am I missing something? I actually don't quite understand the need for this rule. Isn't it best hinged on WAN?
https://wiki.mikrotik.com/wiki/Manual:I ... all/Filter didn't really help me (search for "drop all not coming"). You would expect to see some mapping to the RouterOS's defconf wouldn't you? Be nice if there was a function to double check WAN input is sane. I've had a compromise before when I accidentally allowed access to a default admin/nopasswd routerboard.
Full config https://s.natalian.org/2018-09-22/uptown.txt
Code: Select all
/ip firewall filter
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=drop chain=input comment="defconf: drop all not coming from LAN" disabled=yes 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
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
add action=accept chain=input comment="default configuration" protocol=icmp
add action=accept chain=input comment="default configuration" connection-state=established,related
add action=drop chain=input comment="default configuration" in-interface=unifi
add action=fasttrack-connection chain=forward comment="default configuration" connection-state=established,related
add action=drop chain=forward comment="default configuration" connection-nat-state=!dstnat connection-state=new in-interface=unifi
add action=accept chain=forward comment="default configuration" connection-state=established,related
add action=drop chain=forward comment="default configuration" connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment="default configuration" out-interface=unifi
Full config https://s.natalian.org/2018-09-22/uptown.txt