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.
  • I do not even see any option to bind a FW rule to any interface.

    Sorry that I was unclear - I meant the definitions used in the rule.

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

    That's what I was talking about.  The "External (Address)" object is bound to the External interface.  In any case, the 'Destination' in a rule for a real server behind 'Load Balancing' has to be the internal IP of the server, not the public IP of the Virtual Server.  Try what I suggested above: 'Any -> HTTPS -> {10.0.20.90 with 'Interface: >'} : Allow'.

    Does it work now?

    Cheers - Bob
  • Try what I suggested above: 'Any -> HTTPS -> {10.0.20.90 with 'Interface: >'} : Allow'.

    Cheers - Bob


    No.. I don't want to try that. [:)]  10.0.20.90 is one of the IP's of a real server. That's the job of the load balancing configuration. The FW rule is supposed to just allow the incoming traffic to hit the "Virtual Server" right?

    Otherwise, how can I create FW or DNAT rules to essentially replace the load balancing configuration? Which is not really what I want to do anyway even if it were possible. My only goal is to log what I'm getting, by putting in a manual FW rule.

    Are you saying I should create FW rule where the Destination is the private IP of the router? I'll try that, but it does not sound like anything that's correct because the packets coming in will never have that IP.
  • Or are you suggesting...  that I have FW rule to allow Any with Dest of External WAN...
    and then in addition to that.. I have 1 FW rule for each "real server" that would look like what you suggested?
  • No, you shouldn't need a rule with External WAN as Destination.

    If you have three Real Servers, I would put them in a group and make a single Firewall rule.

    Cheers - Bob
  • You are correct, my friend. I created an FW rule to allow Any over HTTPS to hit my Network group of my Real Server IP's and set to log ..  enabled it and nothing changed... then went to the Load Balancing config and disabled auto-fw-rule and then traffic continued flowing and being logged.

    Good tip!

    Now..  I'm going to implement this and keep it.. because....  ???  one of my routers for the 2nd time with the load balancing config decided to stop working! I hadn't touched it. And to get it working, I had to disable and re-enable the load balancing config with the auto-fw-rule option.  So I'm going to implement this manual rule and hope that it never does that again.

    In general, looks like there is some loose ends to tie up in this auto-fw-rule logic.
  • This is weird! I had started off configuring the SLB (not SOB) to send to 1 server. I did not have a 2nd one at the time but since the GUI forced me to have at least 2, I made up an IP and then in the balancing configuration I set #1 to be at a score of 100 and the 2nd one to be at score of 0.

    Yesterday I added the 2nd server at that IP. So now when I look at the logs, I can see that traffic is being sent to the 2nd server! And 100% of it!! None of the traffic is going to the 1st server as it was before.

    In the picture uploaded, the ***X-WEB1 server has IP of .100  and the ***X-WEB2 server is .101.  In the FW logs now I see everything only going to .101.

    How could this possibly be happening?
  • To make matters worse... I DISABLED the SLB rules, and then RE-ENABLED them and now it works!!!!  What ??  Did Astaro just forget or something??  All I did is add the 2nd server onto the network.  There might have been a second where this 2nd server was trying to advertise as the same IP but I stopped that immediately to change it as it was an image coming up. Either way, why should Astaro suddenly decide to forward to a different IP?
  • oh shoot.  I clicked on NEW REPLY button when I thought I was in the NEW POST mode and intended to put this into its own thread.
  • I would also like to point out about the SLB this issue which in my opinion is a bug.

    I had server #2 this time configured, and as the requests were failing (purposefully done on server #2) I then flipped the 100 / 0  score to be back to going to server #1, yet the requests are still going to #2!

    I even turned off the Persistent option. No change.

    This stinks. The whole point of SLB is to be able to do this stuff... like take a server offline (or at least not send traffic to it) when you know something's wrong.

    Using v8.302
  • Just did a bunch of testing, and here's the process you need to follow to make this work:

    - change the weight of your servers
    - save the configuration
    - DISABLE AND RE-ENABLE the SLB rule as quickly as possible.

    Then it works. Great. so you'll have to lose a few requests during that re-enable time.

    With or without persistent option on makes no difference here. Test was done using a TCP ping program (not web browser)

    Oh, and WATCH OUT for that sorting! Because Astaro loves to sort things by Status by default, so if you SLB rule is not at the top and you disable, it will immediately re-order and your 2nd click might be changing a totally different rule.