Hello guys,
I am trying to add the correct firewall rules on my mikrotik router.
The router is running behind the ISP modem. The WAN interface (eth1) has a static IP address on 192.168.1.0/30 ( .2 is the Mikrotik .1 is the ISP) than the LAN has a 192.168.88.0/24 subnet.
I have disabled the DHCP on the ISP modem (because it’s not possible to convert it to Bridge, it’s a VDSL modem
) and I added the mikrotik IP to the DMZ (to avoid any port filter from the ISP modem)
I have 2 services actually running and working fine on the Mikrotik (OpenVPn and L2TP IPsec) . No issue with all off them . I have changed the default port for ssh, ftp, web. the cli is accessible only by ssh with a sshkey. But I am still feeling unsecure
.
I don’t have too much rules running on and I would like to get your help to setup them in a proper way. Thank you in advance
/ip firewall filter
add action=accept chain=input comment="accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="drop invalid" connection-state=invalid
add action=accept chain=input comment="accept ICMP" protocol=icmp
add action=accept chain=input comment="accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=forward comment="accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="accept out ipsec policy" ipsec-policy=out,ipsec
add action=accept chain=forward connection-mark=TV
add action=accept chain=input dst-port=1194 protocol=tcp
add action=fasttrack-connection chain=forward comment=fasttrack connection-state=established,related
add action=accept chain=forward comment="accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="drop invalid" connection-state=invalid
add action=drop chain=forward comment="drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new disabled=yes in-interface-list=WANList
add action=drop chain=input comment="drop all not coming from LAN" disabled=yes in-interface-list=!LANList log=yes
add action=accept chain=input comment="default configuration" connection-state=established,related
add action=accept chain=input src-address-list=allowed_to_router
add action=drop chain=input comment=winbox dst-port=8291 in-interface=WAN protocol=tcp
add action=drop chain=input comment=winbox dst-port=8291 in-interface=WAN log=yes protocol=tcp