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

What arguments does the "Live Log: Packet filter" accept?

Hi.

I have a computer connected on the "outside" to an ASG v7 firewall, with no intervening devices. I can ping to the firewall's outside IP address (let's call that address "A") from that computer. I have one NAT rule that I want to set up, which will hide the internal address (let's call that internal IP address "B") from the outside world. I believe this is the most common way to configure NAT: outside address accessible to the world, but inside address hidden from the outside world. 

So, the NAT rule I have set up is DNAT: 

traffic source: any
traffic service: any
traffic destination: A+1

NAT mode: DNAT

destination: B
destination service: any

Automatic packet filter rule: checked.



I have a single packet filter rule, Rule 1, set up: ANY -> ANY -> ANY (anything coming from any address, going to any address, using any protocol, should be allowed).

I initiate a ping request to A - that works.
I initiate a ping request to A+1 - that doesn't work.
I initiate a ping request to B - that works!!!

Furthermore, every time I initiate a ping, I watch the "Live Log: Packet filter", but all I get are "Webadmin Connection" lines (since I have the Webadmin interface opened up in a separate window). I have two questions about that:

1. Why don't I see any pings in the "Live log", either when pinging to A, A+1, or B? (I do have every ICMP and Ping checkbox checked on in the ICMP tab of the Network Security -> Packet Filter screen.)

2. How can I use the "Filter" text field to either hide all the "Webadmin Connection" lines, or just show any ping activities? I have looked around the documentation to see what arguments that packet filter will accept, but have not seen a word about that.

Ironically, I can ping into the internal network through the firewall, so I get ping replies from B, B+1, B+2. (I did tell Astaro to let pings go through, but I was expecting to get ping replies from A+1, A+2, etc.)

After that, I tried to change the "DNAT" to "SNAT", then "Full NAT". No matter what I set it to, I still get the same results: I can ping into the internal network (B addresses), not the A+1 addresses, but I never see any ping activities on the "Live Log: Packet filter" screen.

What have I colossally hosed up???

Thanks for your advice.


This thread was automatically locked due to age.
  • I'm a little confused about your explanation.  I don't know you well enough to rule out the possibility that you have DNAT/SNAT confused with Masquesading.  Do you have a masquerading rule? 'Internal (Network) -> External (interface)'?

    Normally, internal traffic won't transit the Astaro.  If you have allowed traffic going through the Astaro and you want to see it in the PF live log, you need to select 'Log traffic' in the PF or DNAT/SNAT definition.

    Cheers - Bob
    PS The filters in the logs are simple; no wildcards and no negatives. "Harr" gets "Harrison" and "Harris".
  • I do have a masquerading rule, internal (network) -> external (interface), that is turned off (indicated by a red box next to the rule instead of a green box). My assumption is that a rule with a red box next to it means that I can ignore its existence. Can I simply use the masquerading rule instead of any dnat/snat to achieve the same goal?

    Although I haven't mentioned it before, I do have a dmz as part of the Astaro configuration, which is where the target device is that I am attempting to contact (at address "B"). Does that change how the firewall will behave in relation to what is visible and what is not.

    As far as the filters in the logs go, the exclusion of the negative is unhappy news for me, since I get pages and pages of "Webadmin connection" which I would like to get out of my face, so I can simply see what is significant and not see what is not. Since I'm not sure of what else might be coming through, I can't filter the "correct" string to include. Oh, well.
  • imangione,
     
    you don´t see ping entries in the live log _because_ of you have activated all check boxes in the "ICMP" tab. turn them all OFF, then you will see the pings packets in the live log.
    Further, you can deactivate the disturbing "webadmin connections" by un-checking the "log access log" in the "management - webadmin settings - access control - log access traffic" check box.
     
    I suppose the reason why you can´t ping "a+1" is either that "a+1" is an address that doesn´t belong to you (so your provider doesn´t route it to your asg) or - more probable - you simply have forgotten to create an alias IF (additional interface) for "a+1", so the packets will never get to your ASG.
     
    BTW, a general hint, try to use your really used IP adresses in these forum, no abstract examples like "a" , "b", "a+1" and so, because this is confusing and sometimes hides the real problem from the other forum members.
  • you don´t see ping entries in the live log _because_ of you have activated all check boxes in the "ICMP" tab. turn them all OFF, then you will see the pings packets in the live log.


    • The settings I have all imply that I will be disallowing ping traffic if I check them off. For instance, the following are the options on the ICMP tab:



       
    • Global ICMP settings:
         
    •  Allow ICMP on firewall 
         
    •  Allow ICMP through firewall 
         
    •  Log ICMP redirects 

       
    • Ping settings:  
         
    •   Firewall is Ping visible 
         
    •   Ping from Firewall 
         
    •   Firewall forwards Pings 

      Which of these should be turned off to allow me to both Ping and see that Ping traffic in the log, or are these mutually exclusive concepts?

     
     




    Further, you can deactivate the disturbing "webadmin connections" by un-checking the "log access log" in the "management - webadmin settings - access control - log access traffic" check box.


    • Thank you - I have done that (unchecked the "log access traffic" check box), which is exactly what was needed.



     
    I suppose the reason why you can´t ping "a+1" is either that "a+1" is an address that doesn´t belong to you (so your provider doesn´t route it to your asg) or - more probable - you simply have forgotten to create an alias IF (additional interface) for "a+1", so the packets will never get to your ASG.
     


    • My provider insists that they have a route for a block of addresses, including A, A+1...A+n, all within my stated block.




    BTW, a general hint, try to use your really used IP adresses in these forum, no abstract examples like "a" , "b", "a+1" and so, because this is confusing and sometimes hides the real problem from the other forum members.[/QUOTE]


      I'm sorry if the abstraction of IP addresses to "A", and "B" is confusing. On the other hand, I am working in an environment that both requires security, and one that I am not fully confident about (actually, not confident about my own configuration of the firewall, not the Astaro product itself). I'm sure you understand my reluctance to reveal actual IP addresses. 

      If this becomes a major issue, I will create addresses similar to those in question, if that will help. 

      Thanks for your thoughtful and detailed response, Ölm.

      John

  • Hi, I don't think Astaro will log ICMP (as it could quickly fill the logs if you were under a DOS), other than ICMP redirects (if you enable that option).

    You could run tcpdump on the console/shell however.

    Barry
  • The settings I have all imply that I will be disallowing ping traffic if I check them off. For instance, the following are the options on the ICMP tab:[....]

    Which of these should be turned off to allow me to both Ping and see that Ping traffic in the log, or are these mutually exclusive concepts?


    If you want to see _any_ type of icmp communication, simply disable them ALL. As you have a any-any-any-accept fw rule, this rule will allow the icmps but they are logged.

    There is a common misunderstanding about the "ICMP settings" tab:
    if you ENABLE a check box there, this will mean, you ENABLE this type of icmp traffic with a so-called "implicit fw rule", so you don´t have to create manual packetfilter rules for this icmp traffic. However, the disadvantage is that you cannot see the packets in the log (and you cannot enable logging either).

    if you DISABLE the check boxes there, it justs means that there will be NO IMPLICIT FW RULE for icmp traffic, so icmps will be blocked as long as there is no manual packetfilter rule for them. As you have a packetfilterrule any-any-any-accept, the icmps will be allowed by this rule, and if you have logging enabled for this rule, you also will see them in the packetfilter log.
    Of course, a rule like "any-any-group_of_ICMPs-accept" will do a better job, as you can manually enable and disable logging afterwards.If this becomes a major issue, I will create addresses similar to those in question, if that will help. 

    Thanks for your thoughtful and detailed response, Ölm.

    No problem. You didn´tt answer my question about the alias ip/additional interface, so I cannot help you further at the moment with the NAT issue.

    Enable the ICMP logging and if you see there almost icmps you create BUT 
    NOT the ICMPs to A+1, it is a routing issue. Check your additioal interface setting then and if you don´t succeed I recommend tcpdump, as Barry said.
  • Thanks, again, Ölm, for your replies. You were correct about the alias ip/additional interface: I did not have one set up, but after your post/recommendation I immediately found what you were talking about and set one up. So, you were, again, very insightful and accurate with your suggestion.

    I will also turn off the ICMP "pass through" settings on the ICMP tab, and let the any-any-any rule log the entries in the live log, so I can better see what is going on, at least at that level.

    Thanks again.
  • I still have not found any documentation on how to run/use TCPDUMP, but I'll work around that for now.
  • What I have figured out at this point:

         I don't need to mess around with DNAT/SNAT for what I am attempting to accomplish.
         Setting up a simple masquerade rule will do what I need to get done.

    What I'm not sure about at this point:
         Are there any situations that would require me to restart the firewall, specifically when I am changing PF rules, networks, interfaces, etc., or do the changes take effect immediately?
          Are all changes committed to disk when they are made, or is there a separate save step that must be taken to insure that the firewall will come up as it was last configured? (I'm thinking of a particularly obnoxious feature of another firewall vendor that loses all changes when a device is rebooted, unless those changes were explicitly committed to "disk" (permanent storage) before the reboot event.)

    Thanks for your help.
  • If I had no PF rules established, would the default behavior be to allow all traffic or to deny all traffic?