Guest User!

You are not Sophos Staff.

[9.200][BUG] IPv6 HE tunnel has no firewall protection

I tried out Hurricane Electric's IPV6 port scan on my side of the tunnel and here were the results:
Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2014-03-28 19:06 PDT
Interesting ports on 
(2001:XX:XX:XX::XX):
Not shown: 987 closed ports
PORT     STATE    SERVICE
25/tcp   open     smtp
53/tcp   open     domain
465/tcp  open     smtps
587/tcp  open     submission
4444/tcp filtered krb524
5432/tcp open     postgresql
6666/tcp filtered irc
6667/tcp filtered irc
6668/tcp filtered irc
6669/tcp filtered irc
7000/tcp filtered afs3-fileserver
8080/tcp open     http-proxy
9999/tcp filtered abyss

Nmap done: 1 IP address (1 host up) scanned in 12.36 seconds


I then went to the Internet and tried scanning from another IPV6 site thinking that I might get different results.  That was not the case.  

I then set up firewall rules to explicitly blocked IPV6 traffic to that tunnel address (taking into account that certain ICMP functionality was necessary) and unfortunately that didn't change the results.  

I tried looking through the iptables rulesets to see where such protection should go to offer assistance but I ran out of time.  To me this is a bug unless someone can convince me to the contrary.  It seems that all of the ASG's services should be blocked by default from the Internet in some way.
Parents
  • Hi Ian,

      No, I did not do an internal scan.  I did one from Hurricane Electric’s portscan service.  It uses an IPV6 address 5 hops away from my tunnel broker address.  I also did a scan from subnetonline.com.  

      As far as firewall rules go:

    Rule 1: IPV6 Broker(Network) -> IPV6 Broker (Address), proto any, allow.  Essentially allowing all of my IPV6 subnets talk to the broker address.  

    Rule 2: Any IPV6 -> IPV6 Broker (Address), proto any, drop and log.
    This rule should drop any traffic to the broker address (2001:XX:XX:XX::XX
    ).

    I put those two rules in just to prove to myself that my lower numbered default deny for ipv4 and ipv6 rules were not working.  Just for completeness my default deny stance does take into account allowing all of the necessary IPV6 ICMP traffic that must be allowed to ensure IPV6 works.  Either 


    As far as other services I have:
    I have DNS enabled for my two internal IPV4 subnets and 1 internal IPV6 subnet (not on the same subnet as the broker address).

    DHCP but only for internal subnets (not that the portscan would show that).

    I do have IPV4 NAT for several subnets and 1 DNAT rule for redirecting outgoing IPV6/IPV6 NTP to an internal NTP server.  

    Postgres is not a service I have control over but should be blocked by Rule 2 above.  It shouldn't be listening on anything but localhost.

    Web Filterering is enabled but for 2 IPV6 subnets (not on the same subnet as the broker address).  

    WebAdmin is enabled but that application is only configured to listen on an internal IPV4/IPV6 subnet which is not on the same subnet as the broker address.

    Host based email relaying is enabled for an internal IPV4/IPV6 subnet which is not on the same subnet as the tunnel broker address.

    Following are the IPV6 listening ports for all addresses:

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State      
    tcp        0      0 :::18080                :::*                    LISTEN      
    tcp        0      0 :::3840                 :::*                    LISTEN      
    tcp        0      0 ::1:18081               :::*                    LISTEN      
    tcp        0      0 :::587                  :::*                    LISTEN      
    tcp        0      0 :::8080                 :::*                    LISTEN      
    tcp        0      0 :::465                  :::*                    LISTEN      
    tcp        0      0 :::7890                 :::*                    LISTEN      
    tcp        0      0 :::53                   :::*                    LISTEN      
    tcp        0      0 :::5432                 :::*                    LISTEN      
    tcp        0      0 :::25                   :::*                    LISTEN      
    tcp        0      0 :::4444                 :::*                    LISTEN      
    udp        0      0 :::53                   :::*  


    By the way I did an nmap against my public IPV4 address and the standard 1000 ports all showed up as filtered so my default deny inbound rules for Internet sources rules is working (for IPV4).

    Let me know what other information I can provide.

    thanks!
    -Aron
Reply
  • Hi Ian,

      No, I did not do an internal scan.  I did one from Hurricane Electric’s portscan service.  It uses an IPV6 address 5 hops away from my tunnel broker address.  I also did a scan from subnetonline.com.  

      As far as firewall rules go:

    Rule 1: IPV6 Broker(Network) -> IPV6 Broker (Address), proto any, allow.  Essentially allowing all of my IPV6 subnets talk to the broker address.  

    Rule 2: Any IPV6 -> IPV6 Broker (Address), proto any, drop and log.
    This rule should drop any traffic to the broker address (2001:XX:XX:XX::XX
    ).

    I put those two rules in just to prove to myself that my lower numbered default deny for ipv4 and ipv6 rules were not working.  Just for completeness my default deny stance does take into account allowing all of the necessary IPV6 ICMP traffic that must be allowed to ensure IPV6 works.  Either 


    As far as other services I have:
    I have DNS enabled for my two internal IPV4 subnets and 1 internal IPV6 subnet (not on the same subnet as the broker address).

    DHCP but only for internal subnets (not that the portscan would show that).

    I do have IPV4 NAT for several subnets and 1 DNAT rule for redirecting outgoing IPV6/IPV6 NTP to an internal NTP server.  

    Postgres is not a service I have control over but should be blocked by Rule 2 above.  It shouldn't be listening on anything but localhost.

    Web Filterering is enabled but for 2 IPV6 subnets (not on the same subnet as the broker address).  

    WebAdmin is enabled but that application is only configured to listen on an internal IPV4/IPV6 subnet which is not on the same subnet as the broker address.

    Host based email relaying is enabled for an internal IPV4/IPV6 subnet which is not on the same subnet as the tunnel broker address.

    Following are the IPV6 listening ports for all addresses:

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State      
    tcp        0      0 :::18080                :::*                    LISTEN      
    tcp        0      0 :::3840                 :::*                    LISTEN      
    tcp        0      0 ::1:18081               :::*                    LISTEN      
    tcp        0      0 :::587                  :::*                    LISTEN      
    tcp        0      0 :::8080                 :::*                    LISTEN      
    tcp        0      0 :::465                  :::*                    LISTEN      
    tcp        0      0 :::7890                 :::*                    LISTEN      
    tcp        0      0 :::53                   :::*                    LISTEN      
    tcp        0      0 :::5432                 :::*                    LISTEN      
    tcp        0      0 :::25                   :::*                    LISTEN      
    tcp        0      0 :::4444                 :::*                    LISTEN      
    udp        0      0 :::53                   :::*  


    By the way I did an nmap against my public IPV4 address and the standard 1000 ports all showed up as filtered so my default deny inbound rules for Internet sources rules is working (for IPV4).

    Let me know what other information I can provide.

    thanks!
    -Aron
Children
  • Hi Aron,
    I am not sure of the logic of your NTP rule. I block all outgoing NTP traffci from internal netwroks and use the DHCP server to provide the NTP server address which is the internal address of the UTM.

    Let us review your open ports,
    port 25 mail
    port 587 mail
    port 465 mail
    port 8080 the web proxy I suspect 18080 is also the webproxy
    port 53 DNS
    port 4444 is utm admin suspect you have an allow in your webadmin configuration that you are not aware of.

    You said you have mail relay enabled, shows in the above mail ports.
    I am not sure what the other ports are used for in your configuration?

    Your internal configuration allows which internal networks can use the feature, they do not control the external interfaces they listen on. You should not have any external address in your proxy configurations.

    Ian
  • I tried the port-scan on
    ipv6.chappell-family.com - Online IPv6 Ping and Port Scanner
    and
    IPv6Tech - IPv6 Tools and Tutorials
    and the only ports I get open are 25 and 465. I am running a mail server so that is expected. Also the results are with anti port-scan turned off, otherwise the results are different.
    Another thing I noticed was that the IPv6 scanners are not as accurate as IPv4 scanners because every once in a while I was getting closed ports instead of stealth ports.

    I agree with Ian on his explanation for some ports like DNS and webadmin etc that can be opened to the world by allowing ANY network but there is a configuration error or  the test results are obviously wrong for other ports.