Community discussions

MikroTik App
 
aTan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 01, 2011 11:55 am

IPv6 statefull firewall

Fri May 24, 2013 10:59 am

Hi, I have a native IPv6 connection which works fine. But problems start when I create firewall rules to secure inner network. It looks like IPv6 firewall is not stateful. First two rules don't capture any packets and the last one drops everything. Am I doing wrong something?

CCR, ROS v6.0.
/ipv6 firewall filter
add chain=forward connection-state=established
add chain=forward connection-state=related
add chain=forward protocol=udp
add chain=forward protocol=icmpv6
add action=drop chain=forward connection-state=new disabled=no in-interface=Inet_br1 out-interface=Intra_br0
 
Rudios
Forum Veteran
Forum Veteran
Posts: 972
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: IPv6 statefull firewall

Fri May 24, 2013 11:11 am

Hi, I have a native IPv6 connection which works fine. But problems start when I create firewall rules to secure inner network. It looks like IPv6 firewall is not stateful. First two rules don't capture any packets and the last one drops everything. Am I doing wrong something?

CCR, ROS v6.0.
/ipv6 firewall filter
add chain=forward connection-state=established
add chain=forward connection-state=related
add chain=forward protocol=udp
add chain=forward protocol=icmpv6
add action=drop chain=forward connection-state=new disabled=no in-interface=Inet_br1 out-interface=Intra_br0
I'm not sure what you are trying to do, but I would think you should also create an accept rule for traffic from inside to outside.
 
aTan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 01, 2011 11:55 am

Re: IPv6 statefull firewall

Fri May 24, 2013 11:38 am

Drop rule is for internet->intranet only, so reverse traffic must be accepted by default. There is nothing special, just basic firewall rules. I have the same for IPv4.
 
Rudios
Forum Veteran
Forum Veteran
Posts: 972
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: IPv6 statefull firewall

Fri May 24, 2013 12:10 pm

Sounds reasonable.
I almost have the same, only difference is that I allow outgoing and than block everything.
Does that change the behaviour?

I'm also curious why icmp and udp are needed.
For IPv4, those are not applicable.
 
aTan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 01, 2011 11:55 am

Re: IPv6 statefull firewall

Fri May 24, 2013 12:59 pm

Icmp is vital for ipv6 fragmentation and neighbor discovery capabilities. Udp rule can be ignored. What do you mean by they are not applicable in ipv4?
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: IPv6 statefull firewall

Fri May 24, 2013 2:41 pm

Is there IPv6 traffic through the router? The accept rules for Established & Related will normally show plenty of hits if they are the top rules on a system running IPv6 traffic. I have that running on many systems although those systems are generally on ROS 5 at this point.
 
aTan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 01, 2011 11:55 am

Re: IPv6 statefull firewall

Fri May 24, 2013 4:47 pm

Yes, there is traffic. Without the drop rule I can access any ipv6 enabled webpage on my pc. But with it enabled everything timeouts and the drop rule counter is increasing. And it is the last rule in a list.

It behaves like it can't hit connections by state. Because everything is dropped even with connection-state=new in the drop rule.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: IPv6 statefull firewall

Fri May 24, 2013 6:17 pm

I am not sure of your interface naming, but what you should be doing is :

Permit NEW connections from internal to external (action=accept)

Then below all your earlier rules have a rule with no selection criteria and action=drop - the "drop all" rule.

You seem to be attempting to block NEW connections inbound which isn't a good plan - better to explicitly Permit certain traffic and Deny everything else.
 
aTan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 01, 2011 11:55 am

Re: IPv6 statefull firewall

Fri May 24, 2013 9:16 pm

Inet is an internet bridge interface, Intra is a LAN bridge interface. I blocked NEW because I don't want any new connection to access LAN from internet. In the end it doesn't even matter if I block only NEW or all states. The problem is that firewall doesn't hit connections with the state established or related. And these rules are at the first place. But packet counters are always zero.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: IPv6 statefull firewall

Fri May 24, 2013 9:35 pm

Are these all if the IPv6 firewall rules in place?

Perhaps there is a connection tracking bug but you would also see no ESTABLISHED or RELATED hits if no NEW connections can be made.

Is this the first ROS6 version you have tried or did you have any of the RC versions? Any difference?
 
aTan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 01, 2011 11:55 am

Re: IPv6 statefull firewall

Fri May 24, 2013 10:19 pm

I would see established and related states from new connections coming from LAN, because only new connection from internet are blocked. I've been using CCR with 6RCs for several months, but only now I've tried to enable IPv6.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: IPv6 statefull firewall

Sat May 25, 2013 2:58 am

It might be worth uploading the config. Is there any way you can test whether a non-bridged WAN interface shows the same behaviour?
 
aTan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 01, 2011 11:55 am

Re: IPv6 statefull firewall

Sun May 26, 2013 4:53 pm

So I'm not alone. It must be some ugly bug.
http://forum.mikrotik.com/viewtopic.php ... 62#p369705

Who is online

Users browsing this forum: Ahrefs [Bot] and 39 guests