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

NAT for 2 networks

I have 3 network cards in my astaro box, External, Internal and DMZ

unfortunately I dont know how to correctly configure the NAT rules for both to share the internet

I prefer to just masq the whole network instead of single hosts in the dmz then control with Packet filtering.

As i have it now, after playing with it a lot, the internal doesnt seem to be able to open ports externally well, and the dmz has no access
I believe I left it as a standard masq rules of any-> inet (which i thought would mean both the Internal and the DMZ, guess not)
There will be some open ports on both networks ideally

tips would be welcome!


This thread was automatically locked due to age.
Parents
  • my way is to set up two seperate masq rules for internal and dmz so that both can connect external and do the "rest" like access to dmz-servers from ext via dnat/snat and filter rules; this gives proper security btw. internal and dmz too, controlled by rules...
  • I guess i need a little more handholding than that
    previous to astaro, my knowlege of NAT was contained in a linksys box [:P]

    i had the 2 networks as you suggest before, but the dmz could not see internet still, even after a rule in firewall allowing all traffic in and out of dmz

    Which rules do i use, standard masq, or d/snat?
    eventually there will be some ipsec networks added too so i need expandability
    For reference sake, my internal is a 192.168.7 address range, and the dmz is in the 10.'s

    Im trying to get this resolved now because I am going to reinstall astaro on a new box and want to have it right from the start
    thanks again for the help
  • MASQ is for Outgoing traffic from private, internal networks (10.x, 192.168.x, ...)

    DNAT is for incoming traffic if your EXT IP is dynamic (dhcp or pppoe or whatever)

    SNAT, I believe, is for incoming traffic if you have static EXT IP.

    Barry
  • You'd want to start with a MASQ setup for EACH INT network.

    Then, you'll need PacketFilter rules to allow those networks to go out.
    You may also want rules to prevent your DMZ from talking to INT net.

    Barry
  • In order to access the Internet from both your Internal and DMZ networks, you have to create two separate MASQ rules:

    A rule that masquerades the Internal network in behind the WAN interface.
    A rule that masquerades the DMZ network in behind the WAN interface.

    After that is done, create appropriate packet filter rules to enable the access you need for each of the two networks.
  • Just to add:

    A cute shortcut is to "supernet" the networks and refer to them as one network for the masquerade rule.

    So, for example, if Internal is 192.168.1/24, and DMZ is 192.168.2/24, make a network definition called Enterprise that's 192.168/16, and use Enterprise for your masquerade rule, since Enterprise includes all 192.168 networks...
Reply
  • Just to add:

    A cute shortcut is to "supernet" the networks and refer to them as one network for the masquerade rule.

    So, for example, if Internal is 192.168.1/24, and DMZ is 192.168.2/24, make a network definition called Enterprise that's 192.168/16, and use Enterprise for your masquerade rule, since Enterprise includes all 192.168 networks...
Children
  • [ QUOTE ]
    A cute shortcut is to "supernet" the networks and refer to them as one network for the masquerade rule.

    So, for example, if Internal is 192.168.1/24, and DMZ is 192.168.2/24, make a network definition called Enterprise that's 192.168/16, and use Enterprise for your masquerade rule, since Enterprise includes all 192.168 networks... 

    [/ QUOTE ]It is a good idea, in theory, especially if you have more than just the two Internal and DMZ subnets. But for just two nets, it is probably more trouble to create the supernet enterprise definition than it is to simply add another masquerading rule. Individual rules also gives you a better granularity of control. Who knows, you may at some point wan't to change or eliminate the DMZ masq rule without having it affect the similar settings for the Internal network.