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

Problem with multiple public IPs and DNAT

Hallo there,

we have following configuration on ASL 3.2:

eth0: 192.168.0.1/255.255.255.0 (GW: none)
DMZ: 10.0.0.1/255.255.255.0 (GW: none)
Ext: x.y.z.130/255.255.255.224 (GW: x.y.z.129)
Ext_alias_1: x.y.z.156/255.255.255.255 (GW: none)
Ext_alias_2: x.y.z.149/255.255.255.255 (GW: none)

Network definitions:
DMZ_Server_1: 10.0.0.156/255.255.255.255
DMZ_Server_2: 10.0.0.149/255.255.255.255

DNAT Rules:
Ext_alias_1 (HTTP) -> DMZ_Server_1 (HTTP)
Ext_alias_2 (HTTP) -> DMZ_Server_2 (HTTP)

MASQ Rules:
eth0->All
DMZ->All

Both servers are identical hardware, identical (imaged) Win2K installations with the same network settings (except the IP of course).
They have two network cards one with 10.0.0.x ip and the other one with 192.168.0.x ip in the backup network, which is actually the LAN (on eth0) of ASL, as well, which should be no problem.

We cannot use Proxy ARP because, we have just small range x.y.z.130/255.255.255.224 and we need effectivelly 20 IPs form this range for our servers in DMZ, and may be I am missing something from subnet masking theory but i didn't find any way to split our range.

Our problem is, that from outside we can ping and normally access server 2, but NO WAY server 1.

Can anyone explain how's that ? We had the same case on Astaro 2.0 Up2Date 2.0.25.
We are stuck with this already third night, and we are really desperate.

I will appreciate ANY hint. Thanks.


This thread was automatically locked due to age.
Parents
  • You have not set the packet filter, in default all service deny, and you try set the follow:

    MASQ:

    eth0 -> Ext_interface
    DMZ  -> Ext_interface

    Packet filter:

    eth0 -> Any_port -> Any_Server -> Any -> allow
    DMZ -> Any_port -> Any_Server -> Any -> allow
    Any -> http -> DMZ_Server_1 -> http -> allow
    Any -> http -> DMZ_Server_2 -> http -> allow
  • Thanks for your reply,

    oh yes I forgot, i have set for testing purposes the packef filtering any -> any - allow. Btw. masquerading has nothing to do with accessing the servers from the outside... If it was that, both servers would not be accessible not just one.
  • Ext aliases should have have a proper netmask
    so if your interface has netmask 255.255.255.248
    then so should the alias. Gateway is irrelevant unless the alias is a different ip range and then you are better off with another network card.

    You *must* have packet filters allowing traffic from Any on port HTTP to each web server. I would imagine that you are having problems because you have some sort of packet filter that allows traffic to one server already, perhaps with a blanket rule.

    Make sure the servers are in the same netmask as the ethernet interface, and that they have the gateway set to the IP address of the eth interface on Astaro for the DMZ

    It definitely works here with mutliple servers, you have missed something.

    Try and nail down what exactly it is that is causing the problem:

    Try swapping the servers IP addresses over.
    Try swapping network cables
    Try setting up the server that doesn't work on its own without the other server. does that work?
    etc etc
Reply
  • Ext aliases should have have a proper netmask
    so if your interface has netmask 255.255.255.248
    then so should the alias. Gateway is irrelevant unless the alias is a different ip range and then you are better off with another network card.

    You *must* have packet filters allowing traffic from Any on port HTTP to each web server. I would imagine that you are having problems because you have some sort of packet filter that allows traffic to one server already, perhaps with a blanket rule.

    Make sure the servers are in the same netmask as the ethernet interface, and that they have the gateway set to the IP address of the eth interface on Astaro for the DMZ

    It definitely works here with mutliple servers, you have missed something.

    Try and nail down what exactly it is that is causing the problem:

    Try swapping the servers IP addresses over.
    Try swapping network cables
    Try setting up the server that doesn't work on its own without the other server. does that work?
    etc etc
Children
  • If I set the alias, with the same mask as the external interface not even one server in DMZ is accessible it is unlogical but it's so. I figured this out after long hours of investigating. The aliases are the same C-class subnetwork as the ip of the external FW interface.

    As for the packe filter rules, I mentioned that there is only one (for testing now), which allows *ANY* traffic. There is no machine/network nor service specific rule. The servers are accessible between each other. They are all in the same 10.0.0.x C-class subnet and even firewall can ping each of them and yes they have gateway set to the FW DMZ interface. 

    Swapping of IP addresses did no good. Cables are not relevant since the communication within DMZ runs without problems.

    But there is one point, which I will test, trying the server without any other in the DMZ.

    Anyway thank you for the reply, it keeps at least my "morale" just above the water.
  • "Any" traffic is no good, you have to direct the traffic coming in via the DNAT rule *AND* the packet filter.

    So you need a DNAT rule for each server:

    Web1_In   Any -> Red_1_Alias_Interface__ / HTTP   None   Web1 

    Web2_In   Any -> Red_2_Alias_Interface__ / HTTP   None   Web2 

    You also need a packet filter rule for each server:

    Any HTTP Web1 Allow
    Any HTTP Web2 Allow

    You also need those netmasks set correctly.

    I think your *ALL* rules are messing things up. Try having one outgoing all rule:

    eth0_Network__ Any Any Allow

    That will cover your green network so everything can get out.

    Also remember that you won't be able to access the web servers via the IP address of the external alias from machines inside the firewall, unless one of the following two criteria are met:

    From the FAQ:

    Solution 1: Put the web server in a different logical network,
    separated from the LAN (in our case, maybe 192.168.2.10).

    Solution 2: Make sure the name "www.myserver.com" resolves into
    the internal address of the webserver for all clients in your
    LAN (via extra DNS server or static hosts file entry).

    Hope some of this helps