I'm trying to understand some basic concepts following this basic guide on mikrotik's documentation
https://wiki.mikrotik.com/wiki/Tips_and ... f_RouterOS
which of these rules prevents access to services on the mikrotik itself (winbox, webfig, ssh etc)?
Create firewall filter rules to protect router from incoming (input) connections:
Code: Select all
/ip firewall filter
add chain=input comment="Accept established and related packets" connection-state=established,related
add chain=input comment="Accept all connections from local network" in-interface=LAN
add action=drop chain=input comment="Drop invalid packets" connection-state=invalid
add action=drop chain=input comment="Drop all packets which are not destined to routes IP address" dst-address-type=!local
add action=drop chain=input comment="Drop all packets which does not have unicast source IP address" src-address-type=!unicast
add action=drop chain=input comment="Drop all packets from public internet which should not exist in public network" in-interface=WAN src-address-list=NotPublic
Create firewall filter rules to protect your local network from passing (forwards) connections:
Code: Select all
/ip firewall filter
add chain=forward comment="Accept established and related packets" connection-state=established,related
add action=drop chain=forward comment="Drop invalid packets" connection-state=invalid
add action=drop chain=forward comment="Drop new connections from internet which are not dst-natted" connection-nat-state=!dstnat connection-state=new in-interface=WAN
add action=drop chain=forward comment="Drop all packets from public internet which should not exist in public network" in-interface=WAN src-address-list=NotPublic
add action=drop chain=forward comment="Drop all packets from local network to internet which should not exist in public network" dst-address-list=NotPublic in-interface=LAN
add action=drop chain=forward comment="Drop all packets in local network which does not have local network address" in-interface=LAN src-address=!192.168.88.0/24
Cause with this configuration I can still access webfig from the outside, so I added this rule to drop traffic directed to non local networks
Code: Select all
/ip firewall filter
add action=drop chain=input comment="Drop all packets from public internet which should not exist in public network" in-interface=WAN dst-address-list=NotPublic