Guest User!

You are not Sophos Staff.

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

DHCP + Public Address +routing

Hello all,

Firstly, excuse my bad english because i'm a french user.

I try the free home edition, juste for trying to understand it.

So my issue is very complicated :

I have two VM into an Esxi

The first VM have 4 network card, it's an Astaro home edition
1 for public network and 3 into 3 differents network called net1 net2 net3
net1: 10.0.0.0/24
net2 : 10.0.1.0/24
net3 : 10.0.2.0/24

The second VM, a centos 6.0, with 3 network card, into net1 net2 net3
ip net1: 10.0.0.10
ip net2: 10.0.1.10
ip net3 : 10.0.2.10


My isp give me 4 public adress.

The first public ip is for the astaro
The 2, 3 and 4 ip is for my centos.

So into my astaro , i have full nat public with private IP

So i have for example into the public address :

1.0.0.1
1.0.0.2
1.0.0.3

So 1.0.0.1 is natted to 10.0.0.10
1.0.0.2 is natted to 10.0.1.10
1.0.0.3 is natted to 10.0.2.10




My astaro can ping 10.0.0.10 10.0.1.10 and 10.0.2.10
i can ping from external 1.0.0.1 
but i cannot ping 1.0.0.2 and 1.0.0.3 

I know why, because the default gateway is 10.0.0.1 and it's eth0 to respond.

So i want now to have the 3 nic respond, i have search, try a lot of commands and configuration, but no solution. Anyone can help me?

I would like when i ping 1.0.0.1 it's the eth0 to respond me, when i ping the 1.0.0.2 it's eth1 to respond, and when i ping 1.0.0.3 it's eth2 to respond.

Please help me

Thank you


This thread was automatically locked due to age.
  • Salut, caradou, et bienvenue au User BB!  Your English is better than OK - t'en fais pas!

    I'll repeat in my own way to confirm I understand.  The Astaro has External interface eth3 with IP 1.0.0.0; the three LAN interfaces are on eth0, eth1 and eth2.

    In order for the your DNATs to work, 1.0.0.1, 1.0.0.2 and 1.0.0.3 must be defined as 'Additional Addresses' on the External interface (eth3).  When you create an Additional Address, create it as /32.  Astaro will create an "(Address)" object that you must use in the following: One DNAT would be, for example:

    Traffic Source: Internet
    Traffic Service: Any {or more restricted, as you prefer}
    Traffic Destination: External [{name for 1.0.0.1}] (Address)
     
    NAT mode: DNAT (Destination)

    Destination: {Host definition for 10.0.0.10}
    Destination Service: {This must be left empty!}


    The Host definition for 10.0.0.10 must have 'Interface: >' and should not be bound to a specific interface.

    Ping behavior is regulated on the 'ICMP' tab of 'Firewall'.

    Cheers - Bob

  • So into my astaro , i have full nat public with private IP


    Can you please add Screenshots of the NAT Rules. (preferably, when you opened the rule via "Edit") This would help a lot.

    #### (First shot: Did you add 1.0.0.2 and 1.0.0.3 under "Additional Addresses" for the external interface?, EDIT: forget my first shot, as Balfons already suggestet that) ####

    Second shot: to what source addresses do you do the "Full NAT" you mentioned? should be the astaro interface ip of the net you try to reach.

    If you are not doing "Full NAT", but DNAT as Balfons says, this behaviour is somewhat clear, because the centos is answering through its default gateway.

    So there are two ways to do it: Full NAT on astaro OR some routing magic on centos (which is possible, but i would have to look it up in some of my archived documentation).

    Kind regards,
    Matthias
  • Merci BAlfson [:)] and thank you matthias.schmidt

    So i have resolv my issue, it's not an astaro issue because i have check with the live log.

    It's a Centos 6/RHE 6 with a new change into the I/O packet :

    A change in the 2.6.31 Linux kernel made the net.ipv4.conf.default.rp_filter = 1 more strict in the I/O that is accepted. Consequently, in Red Hat Enterprise Linux 6, if there are multiple interfaces on the same subnet and I/O is sent to the one that is not the default route, the I/O will be dropped. Note that this applies to iSCSI iface binding when multiple interfaces are on the same subnet. To work around this, set the net.ipv4.conf.default.rp_filter parameter in /etc/sysctl.conf to 0 or 2, and reboot the machine.


    When i have make the change, all is working ok ....

    For your questions, my DNAT/SNAT is ok.

    So thank you very much for you answers


    @BAlfson  au vu de ton nombre de posts, est-ce que je pourrais te déranger de temps en temps en privé? en Français cela serait plus simple pour moi