Community discussions

MikroTik App
 
avihu
just joined
Topic Author
Posts: 15
Joined: Thu Dec 01, 2016 11:13 pm

Router Security

Thu Dec 01, 2016 11:23 pm

I try to close all ports with the command
chain = input add action = drop comment = "Drop everything else"
But this blocks my access to the VPN service and "no-ip" service can not updating
i try to open port 1701 and its not work :(
I'd love to get help
 
TyBermea
newbie
Posts: 29
Joined: Mon Nov 02, 2015 3:18 am
Contact:

Re: Router Security

Fri Dec 02, 2016 4:38 am

Rules are processed in order. You'll need to add action allow rules for each service above the drop rule.
/ip firewall filter
add action=accept chain=input comment="accept established,related" connection-state=established,related
add action=accept chain=input comment=SSTP dst-port=443 protocol=tcp
add action=accept chain=input comment="GRE for IPIP" protocol=gre
add action=accept chain=input comment="L2TP + IPSEC VPN" dst-port=500,1701,4500 protocol=udp
add action=accept chain=input protocol=ipsec-esp
add action=drop chain=input comment="drop all from WAN" in-interface=ether1
add action=accept chain=forward comment="accept established,related" connection-state=established,related
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 in-interface=ether1
 
avihu
just joined
Topic Author
Posts: 15
Joined: Thu Dec 01, 2016 11:13 pm

Re: Router Security

Fri Dec 02, 2016 5:39 am

I find this site
http://www.mikrotikconfig.com/
and now all works fine.
:)