I’m new to Routerboard and I want to configure my Routerboard acting as a “transparant firewall” in the current network, something like this:
LAN (192.168.16.x /24) —> ETH1 RB (192.168.16.254 /24) ----> ETH2 RB ----> LAN 2 (192.168.16.x/24)
Clients that are connected to lan 2 are filtered by the Routerboards firewall.
I tried to creating to interfaces, defining ETH1 as WAN and ETH2 as LAN interface create some firewall policys but without luck.
Found also the method of bridging the 2 interfaces toghether but can’t find a way to get this working.
What is the best way to achieve the goal (both lan and WAN interface on same subnet), i need the capability to use the firewall functionallity to block open connections to specific ports/ip addresses.
Put both interfaces in bridge, enable Use IP Firewall in bridge settings and then you can use firewall. Also don’t miss Out. Bridge Port and In. Bridge Port there.
So i now created a bridge called ‘Servers’, addes ETH1 and ETH2 to this bridge and assigned an ip address 192.168.16.254 to interface ETH1.
I also applied the “Use IP Firewall” setting in the bridge settings menu.
I created a Firewall rule “DROP INPUT ICMP” INCOMING Bridge int. ETH1, outgoing Bridge int ETH2.
When I start a ping from DESKTOP to 192.168.16.30 the ping is not dropped when I apply that rule to INPUT chain, when I switch to FORWARD CHAIN the packet is dropped.
Is it normal that in this situation I always need to apply FORWARD chain instead of input/output chain?
What is the function of the input/output bridge port? if I change port, the firewall rule still works, but I except the firewall rule is broken from the moment I switch in/out ports.. but not
The chains mean different things depending on what the traffic is for.
Input means traffic for the router itself
Output means traffic leaving the router that the router itself generated
Forward means traffic flowing over the router
So yes in your case, yes forward is the chain to be using.
And then add individual rules to from-server and to-server chains without the need to set destination and source interfaces for each of them. The log rules are there only as example.
Thanks for the feedback, that’s running smoothly now.
Next step is creating VLANS on the same network, as described here: http://gcharriere.com/blog/?p=620
→ Created VLAN with ID 10 and horizon 10
→ Assigned VLANS to bridge interface ‘Servers’
→ Assigned VLANS to port eth3
When I now in VMWare create a new VNetwork with VLAN ID 10 and send traffic from the host that uses that network the vlan tags didn’t arrive at MT router. When I do a torch of ETH3 I see something a vlan tag 10 over the logs but i guess that that is the issue.
Got it working after a few hours of euh.. .
Now I got 2 servers which are in different broadcast domain and can’t access each other resources, now my last challenge is the following:
All servers need to have access to just 1 server (dns server), I tried to add routing stuff and so on but can’t get it working.
Probably this is a very small one , but I miss it..
Hello,
Reading some related posts i came to my config which seems to work on my ipv4 and ipv6 network.
The setup is like this:
Internet
|
ISP router with NAT (192.168.1.1; ipv6: 2axx:x:x:x/64 prefix RouterAdvertised)
|
ether5
Mikrotik + wlan
ether4
|
LAN (192.168.1.0/24; ipv6: fe80:: ; 2axx:x:x:x/64)
Somebody has suggested to create additional chains (l2in, l2out, l2in6, l2out6) to distinguish the inbound and outbound traffic. This is awkward, but is the only workaround i know so far that allows to mitigate the absence of the security zones/levels and inbound/outbound directions in Mikrotik architecture. The good things that are possible in Cisco/Juniper are still to be implemented by Mikrotik.
So, i connected my LAN switch to the port 4 (ether4), and the router to the port 5. I went to the bridge/ports and left in the bridge only ether4, ether5 and wlan. This way i have isolated them from the default ether1-gateway and ether2-master-local interfaces.
Then i have adapted/added some more rules into the IP and IPv6 sections:
Right before the denies i put the log lines to troubleshoot the possible errors.
Well, it works as i want it to. It filters the NATed ipv4 traffic and allows the open ports. In ipv6 mode, it allows ICMP and NS/NA/RS/RA packets both ways. Everything outbound is allowed.
Almost all the configuration was done using the web-based GUI.
There may be some unnesessary lines, redundant rules, errors, etc. Adapt and use. Propose better solutions.
I hope this ipv6 transparent config will be useful for somebody.