I got my first MikroTik and while I’m happy with the overall features I’m seeing in the WinBox interface, I am having some problems getting this router to be deployable in one of our standard VoIP situations.
I was able to quickly configure the WAN and LAN addressing schemes. I got on the internet and could browse anything I needed from behind the firewall. Basic router functionality works great. That’s where the issues start: I need to be able to both PING the WAN interface and remotely access the router using WinBox from any IP (I can lock it down in the future). After that, I need to configure for SIP/SCCP prioritization, but I’ll post another topic on that later.
I could use some help with these items: WAN PING response and remote accessibility
I should note that I have been browsing the forums and have tried several of the methods mentioned. I even went as far as factory resetting my equipment and only allowed PING, but to no avail.
Welcome to the world of MikroTik, you’ll love it here. Okay, you’ll occasionally pull out your hair, but you’ll love it again. Here is a very basic setup (delete all current rules).
Create a bridge, put everything you want in there (except eth1 which should be your WAN), name it bridge-LAN.
Paste this into a terminal:
/ip firewall filter
add action=drop chain=input comment="Disallow weird packets" connection-state=invalid
add chain=input comment="Remote Winbox" dst-port=8291 protocol=tcp
add chain=input comment="Allow LAN access to router and Internet" connection-state=new in-interface=bridge-LAN
add chain=input comment="Allow connections that originated from LAN" connection-state=established,related
add chain=input comment="Allow ping ICMP from anywhere" protocol=icmp
add action=drop chain=input comment="Disallow all other input"
add action=drop chain=forward comment="Disallow weird packets" connection-state=invalid
add chain=forward comment="Allow LAN access to router and Internet" connection-state=new in-interface=bridge-LAN
add chain=forward comment="Allow connections that originated from LAN" connection-state=established,related
add action=drop chain=forward comment="Disallow all other forward"
I imagine our friend would like to be able to connect into his own router from his LAN. The other rules I have specified will block access from WAN. Try the rules and see.
Edit** With the below rules I am able to PING the interface now, however I still am unable to connect from a remote IP address: either WebGUI, WinBox, or Telnet
You don’t allow web interface (tcp/80) and telnet (tcp/23) from WAN. But WinBox (tcp/8291) should be allowed from anywhere by first rule.
Btw, “verbose” option for export is not a good idea. It exports all options, including those with default values, and result is too long and very hard to read.
Here is my updated firewall settings. Everything is working swimmingly now. Guess I need to tackle why this isn’t working from the office. Then I get to tackle QoS policies. Thank you everyone for your help.
/ip firewall filter
add action=drop chain=input comment="Disallow weird packets" \
connection-state=invalid
add chain=input comment="Remote Winbox" dst-port=8291 protocol=tcp
add chain=input comment="HTTP Access" dst-port=80 protocol=tcp
add chain=input comment="Telnet Access" dst-port=23 protocol=tcp
add chain=input comment="Allow LAN access to router and Internet" \
connection-state=new in-interface=bridge1
add chain=input comment="Allow connections that originated from LAN" \
connection-state=established,related
add chain=input comment="Allow ping ICMP from anywhere" protocol=icmp
add chain=forward comment="Allow LAN access to router and Internet" \
connection-state=new in-interface=bridge1
add chain=forward comment="Allow connections that originated from LAN" \
connection-state=established,related
add action=drop chain=input comment="Disallow all other input"
add action=drop chain=forward comment="Disallow weird packets" \
connection-state=invalid
add action=drop chain=forward comment="Disallow all other forward"
It’s really bad idea to open winbox, http and telnet from all internet.
Put “related, established” rule on second place in input chain right behind ‘invalid’ rule. And this is not from “connection orginated from lan”. This rule accept most traffic in input chain, so, move it ahead.
In forward chain move rule for “invalid” in first place, or remove it, now it’s just pointless - you drop everything in next (last) line.