Hi!
RouterOS and ip-tables are totally new for me, so i just want to verify that my firewall configuration has any flaws, can it get better/safer? Is is the different rules in the right order?
I’m using NAT, VPN and thankfull for every help and suggestions i can get
Input chain is ok, you allow only selected services and block the rest from WAN.
I’m not sure about the port scanners part, how much it can help. IMHO most of them don’t bother with fancy scans and only check few ports used by most known services. Try to connect, get a reply or not, done. Then they might either try to misuse them (open proxies, dns resolvers, …) or guess passwords (ssh, …). On the other hand, extra checking can’t hurt.
Forward chain is less ok. Since default action is accept, you currently allow everything. Usually you want to allow new connection only from LAN with exception of forwarded ports. In practice, you’re probably open only to devices in same WAN subnet as yours, because the rest of world would require source routing and it’s usually disabled everywhere. But it’s still good idea to add proper config and don’t allow new connections from internet.
Thanks for the reply. I really would like to close down WAN connections, exept for VPN-Access (RouterOS-default). How shall change my rules to support that?
There are connections to router (chain=input) and connection through router (chain=forward). Input from WAN is already ok, you have only icmp and three ports allowed. But you have no filtering in forward chain. Fasttrack speeds up established and related connections, the other rule accepts those that can’t be fastracked and that’s it. Everything else is accepted by default.
If you want to control what happens, good starting point is: