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

DNAT Advice

Hi All,

During 6.312, the DNAT must be different ports
I have a web server at port 80 on my laptop.
This port is not to server website but for F-Secure Policy Manager whereby the it runs a Apache server and clients reports to it via HTTP.

Thus I did a DNAT from Port 1000 -> 80
Example http://account.dyns.org:1000
I recall I created 2 rules
ANY -> WAN Interface Port 1000 Allow
ANY -> My laptop Port 80 Allow

Now in version 7.1
I did a DNAT and used the create rule automatically.
1) I did a scan at GRC and port 1000 is open
2) I run my web server and it seems fine.
3) Run for sometime and I realised it does Not always work and majority of time does not.

4) I do confirm there are times it is successful.

I open Packet Filter

1) It shows "suspecious TCP state" etc in Grey
    Took me sometime and end up I disable everything in Protocol handling
  
2) Now it shows Default Drop.
    By right we should create a rule but I am confused what rule I need as I cannot see the rule that is auto created by the DNAT.

3) I am hasitent to create rule as there are times the console shows client report successfully.

4) I agree rule must be created if 100% default drop but now it seems to work at times, just small minority.


Is this "intermittent" working a DNAT bug ?

Is it still necessary for the ports to be different in 7.1?

Is it advisable to enable protocol handling, check all the boxes and set to strict? Does that make it secure?

TCP Suspicious State in Grey means it drop? or alert and pass thru?


This thread was automatically locked due to age.
Parents
  • "ANY -> WAN Interface Port 1000 Allow"

    This is unnecessary.

    "Is it still necessary for the ports to be different in 7.1?"

    Huh? As long as your ISP allows port 80 incoming, you could use that, or any other port not used by webmin.

    What is your DNAT setting?

    I thought ICMP packets were gray...

    Barry
  • I have a F-Secure Policy Server that runs on my Laptop on port 80 as the module is Apache Server.

    Clients reports to my external interface via port 1000.
    http://***.dyndns.org:1000

    During the Astaro 6.312, the DNAT must be different ports.
    Thus I have to use 1000 -> 80.

    I also have to create 2 rules.
    ANY -> External Interface 1000 Allow
    ANY -> F-Secure Server 80 Allow.

    This worked fine.

    In Astaro, there is Auto Packet Rule.
    Thus I created a DNAT
    ANY Port 1000 -> F-Secure Policy Server 80

    This was actually working thus I mentioned I see clients reporting.

    The "confusion" comes when I open Packet Filter and see a lot of
    Suspecious State in grey showing port 1000 on my External Interface.
    That makes me worried things is dropping.
    Did not know what is suspecious state until I found Protocol Handling.
    Turned Everything Off and now it shows
    Default Drop External Interface 1000
    That got me worried.
    So I create a rule on top ANY -> External Interface Port 100 Allow.
    This cause another default drop whereby 
    External Inferface Port 1000 -> Any  Droped.

    Thinking I seems to be messing things up, I removed all the rules and leave it alone.

    Turns out, the clients are working fine, they are reporting and also receiving the policy etc.

    So what is the problem?

    Honestly, I do not know as I do not know how to read what is behind those IP Address / Ports whereby you see ACKFIn etc is beyond my knowledge.

    [:)]
Reply
  • I have a F-Secure Policy Server that runs on my Laptop on port 80 as the module is Apache Server.

    Clients reports to my external interface via port 1000.
    http://***.dyndns.org:1000

    During the Astaro 6.312, the DNAT must be different ports.
    Thus I have to use 1000 -> 80.

    I also have to create 2 rules.
    ANY -> External Interface 1000 Allow
    ANY -> F-Secure Server 80 Allow.

    This worked fine.

    In Astaro, there is Auto Packet Rule.
    Thus I created a DNAT
    ANY Port 1000 -> F-Secure Policy Server 80

    This was actually working thus I mentioned I see clients reporting.

    The "confusion" comes when I open Packet Filter and see a lot of
    Suspecious State in grey showing port 1000 on my External Interface.
    That makes me worried things is dropping.
    Did not know what is suspecious state until I found Protocol Handling.
    Turned Everything Off and now it shows
    Default Drop External Interface 1000
    That got me worried.
    So I create a rule on top ANY -> External Interface Port 100 Allow.
    This cause another default drop whereby 
    External Inferface Port 1000 -> Any  Droped.

    Thinking I seems to be messing things up, I removed all the rules and leave it alone.

    Turns out, the clients are working fine, they are reporting and also receiving the policy etc.

    So what is the problem?

    Honestly, I do not know as I do not know how to read what is behind those IP Address / Ports whereby you see ACKFIn etc is beyond my knowledge.

    [:)]
Children
  • I'm not sure I understand what you are trying to do o not, but it sounds like you are just trying to setup simple port forwarding. Is this correct?

    If so its just a single DNAT rule (you don't even need a PF rule as long as you check the auto PF rule button in the NAT section)
  • From the manual:
    Strict TCP Session Handling: 
    By default, the system can "pick up" existing TCP connections that are not currently handled in the connection tracking table due to a network facility reset. This means that interactive sessions such as SSH and Telnet will not quit when a network interface is temporarily unavailable. Once this option is enabled, a new three-way handshake will always be necessary to re-establish such sessions. It is generally recommended to leave this option turned off.



    AFAIK, Dropped ACKFINs, etc are due to TCP timeouts not matching on various systems including your servers, your firewall, the remote users system, and their firewalls. I think they may also be due to TCP shortcuts taken by some applications.
    They are not normally something to pull too much hair out over, unless you are seeing thousands of them.

    Barry
  • You asked earlier if the ports have to be different... You can DNAT port 80 to port 80 if you want... but you could always do that in ASL.
    Port 443 was the tricky one before.

    Barry
  • Thank You Kury and BarrG (You helped me a lot with many of my other issues)

    Let me share what I learned from this.

    1) Yes a DNAT rule is sufficient with Auto Packet Filter Rule.
        There is no need for the following rules like what I did in 6.312.
         Any -> WAN Address Port 100 Allow 
         Any -> F-Secure Policy Server Port 80 HTTP Allow.

    2) The confusion / panic is due to somehow in Packet Filter Rules which I used to see if it is working initially.
        I see Suspicious TCP State  ANY IP Address -> My WAN IP:1000
        I turned Off everything under protocol Handling and this makes me see
        ANY IP Address -> My WAN IP: 1000 Default Drop
        Seeing the default drop, I created a rule
        ANY IP Address:source port -> My WAN IP:1000 ALLOW
        This makes me see the traffic allowed but I see the following lines after the above allow.
        My WAN IP: 1000 -> Any IP Address: the same port number above Default Drop.
        And this reached a point I get worried as it seems to get more messy.


    Thus I revoked everything back to Only DNAT with AutoPacket

    ANY Port 1000 -> WAN Address -> F-Secure Policy Manager Port 80 HTTP

    3) So with the DNAT Proven to work as clients appear on my manager, 
      1) If I turn On everything in Protocol Handling + Anti Spoofing Strict, Yes I still see suspecious state.
      2) If I turn Off everything, I still do see any ip -> WAN IP Port 1000 Default Drop.

    Due to the fact I do not understand what is those ACK, ACKFIN, SYN, LEN etc after the IP Address in the packet filter thus for now I assume the firewall is smart to know those are not what I should get and I leave it alone.


    [:)]
  • Saw your other posts... I don't think you really want ANYONE to be able to access your F-Secure server, do you??

    Barry
  • Hi BarryG

    I need to set ANY because those are remote Laptops / Desktops with F-Secure Client Security installed and they can be on any internet connection.

    This F-Secure generates some encryptions keys so I am assuming those traffic not encrypted, it would drop.

    This is my idea of " managed my users over Internet" rather than LAN / VPN and F-Secure happen to use HTTP Traffic thus works fine.