This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Automatic Firewall rules option troubles

Hi.

I found an issue with the "Automatic firewall rules" in the Server load balancing section, and I suppose it might be happening in other areas as well. I contacted support about this and they just replied to me to add a new feature, which I will. But thought to put something more actively read here.

First thing, when I configured a load balancing rule and turned on the auto rule, it worked fine. But it does not log that specific traffic. (this is the feature to add.) So to try to do it myself, I created a FW rule for the same port and destination and enabled logging. SHOCKINGLY..  it does not allow the traffic! And I have no way of knowing what the auto rule does because I can't see it anywhere (another feature).

But that's not all....
After deleting the FW rule I put in, the traffic CONTINUED TO FAIL! yet without logging. So now I'm sitting with no FW rule and the load balancing rule with the auto FW rule option active with no traffic. Solution? I had to disable the auto-FW rule, save it, and then re-enable it.

I also tried performing the test by first disabling the auto-FW rule and then making my manual FW rule but still it did not allow the traffic.

What gives?


This thread was automatically locked due to age.
  • it does not allow the traffic! 

    This probably is because the rule is fashioned to allow traffic in a different chain (FORWARD instead of INPUT, for example).  Please show the block from the Firewall log when the manual rule is in place.

    Cheers - Bob
  • Oh yeah.. hmm. well the log in the FW with either no FW rule or even the manual FW rule has this which is crazy because it should be matching the rule:

    Line 4120: 2012:04:11-16:35:39 173 ulogd[5641]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60002" initf="eth1" outitf="eth0" srcmac="***x" dstmac="***x" srcip="xx.xx.xx.xx" dstip="10.0.20.90" proto="6" length="52" tos="0x00" prec="0x00" ttl="118" srcport="49373" dstport="443" tcpflags="SYN" 


    server load balancing with auto-fw-rule
     Chain LOGACCEPT (3 references)
    > LOGACCEPT  tcp  --  anywhere             173                 tcp spts:tcpmux:65535 dpt:https LOGMARK match 2


    Check this out. I repeated this a few times.

    First of all, while tailing the log in the web GUI, if you go and change the port for the User portal, the tail stops working; you have to re-launch it. I found that out because I thought that maybe my issue was because the User Portal was using also 443 and it was disabled and so somehow the router was just hiding it away. I left it as some other port so that it was not messing with me.. I still think that making this change somehow got the router to listen to my manual FW rules for port 443.

    But I noticed this interesting behavior:
    - turned off the load balancing config.
    - created FW rule for 443 to REJECT.
    - tested tcp ping and saw in the logs the rejections! great.
    - changed FW rule for 443 to DROP.
    - tested and saw the drops. Great.
    - changed FW rule for 443 to ACCEPT.
    - tested and saw the accepts! Still no response on client because nothing's listening on that port.
    - Now I go and enable the load balancing rule (with auto-fw disabled)
    - test tcp ping... and the log shows IT STARTS DROPPING!!!!?!??!?!?!?!?!?
    - turn off the load balancing config.
    - tested tcp and ACCEPTS again! SOB!
    - turned on again the load balancing but this time with auto-fw rule enabled.
    - tested tcp. Log shows nothing, but the tcp ping gets a response from the real servers behind it.

    This is a bug!
  • If Astaro just transparently allowed the iptables stuff, we'd have a clearer solution. They could have just stuck the GUI of Linux's Webmin in there. (Webmin)
  • If Astaro just transparently allowed the iptables stuff, we'd have a clearer solution. They could have just stuck the GUI of Linux's Webmin in there. (Webmin)


    Only a guess...did you also disable manual created dnat rules when enabling the slb? AFAIK the slb does loadbalancing via NAT...

    Wer Schreibfehler findet, darf sie behalten. Wenn ich via IPad poste, sind Verschreiber und grammatikalische Aussetzer irgendwie an der Tagesordnung.
  • Any chance that you have a useable test box coewar?  I'd be interested in seeing if this can be replicated in v9 as well.  UTM 9 Public Beta - Astaro User Bulletin Board.  The next build will most likely be made available tomorrow.
  • Only a guess...did you also disable manual created dnat rules when enabling the slb? AFAIK the slb does loadbalancing via NAT...

    Wer Schreibfehler findet, darf sie behalten. Wenn ich via IPad poste, sind Verschreiber und grammatikalische Aussetzer irgendwie an der Tagesordnung.


    Well here's a problem.  How can I create a NAT rule when the point is to load balance? The functionality of sending the data to more than 1 defined "real server" is not there in creating DNAT/SNAT rules in here.

    But either way, note that the FW logs actually show the packets being DROPPED  when SLB config is enabled even when the FW rule says to ACCEPT.
  • Any chance that you have a useable test box coewar?  I'd be interested in seeing if this can be replicated in v9 as well.  UTM 9 Public Beta - Astaro User Bulletin Board.  The next build will most likely be made available tomorrow.


    I do not have one publicly available at this time. However this one is super easy to set up.

    The router is v8.302 (got updated just today). From a brand new installation, here's all I did:
    - Do not install a license.. using the 30 day trial mode.
    - Create SLB config for HTTPS to 3 real servers. The Virtual server is the External WAN on eth0. 
    - Create FW rule to allow the Internal network to get anything on the internet. (maybe unrelated)
    - Also unrelated: I enable the SSH and set that to some random port.
    - Also unrelated: I set WebAdmin access only to the internal network.

    basically that's it.. and then you follow the other steps..  which mention changing the User Portal port to something other than 443.. though it is not enabled.
  • Just want to re-iterate that there is nothing else configured on this router. It's the simplest of all my routers.
  • Coewar, is either definition in your firewall rule bound to an interface?  The log line shows a drop out of the FORWARD chain (60002).  I know that having an interface-bound definition in the traffic destination will cause a firewall rule to apply to the INPUT chain for arriving traffic.  What happens with a firewall rule that doesn't use anything bound to an interface?  Instead of using the "Internet" object: 'Any -> HTTPS -> {10.0.20.90 with 'Interface: >'} : Allow'.

    Cheers - Bob
  • I do not even see any option to bind a FW rule to any interface.

    There is just SOURCE, SERVICE, DESTINATION.
    My SOURCE is Any. Any is not defined to any NIC. I suppose I can create my own "Any" and specify to bind it to the External NIC.

    SERVICE is of course HTTPS which doesn't bind to anything.

    DESTINATION is my External WAN IP which also is not actually bound to the External NIC.