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

2 gateway and routing / policy routing

I have 2 internet gateway (configuration as below) and a problem.

eth1 80.100.111.66 mask 255.255.255.240 gw 80.100.111.65

eth1:1 81.222.111.130 mask 255.255.255.224 gw 81.222.111.129

(the ip are not real, they are of example)

Some DNAT rules masq some servers on 80 class and other servers on 81 class.

The problem is that when primary default gw is 80.100.111.65, services on servers on 81.222.111.x don't work. 
If i change gw order setting primary gw to 81.222.111.129, services on 81.222.111.x work, but services on 80.100.111.x stop to work.

I suppose the problem is that reply packets leave firewall correctly Natted but always routed to primary default gw. And if this gw is the wrong gw, it drops the packets because they aren't in his subnet.

How can i tell to ASL that traffic which is arrived on subnet 81.222.111.x MUST use 81.222.111.129 gw for reply packets, and so for other subnet.

I have tried Policy routing, but with unsuccess.

Best Regards
Fabrizio

Sorry for my bad English


This thread was automatically locked due to age.
  • I think you can do it only connecting on different interfaces.
    I have a similar problem.

     rraffaelli@adaconsulting.net   
  • Now we have Enterprise license with 6 ethernet.

    2 gateway are now on separate ethx but the problem persist.

    Hi
    Fabrizio  
  • Please make me understand better ...

    1)Do You have something like two HDSL links that come to you thru a single double serial single ethernet router or you have two separate Internet links that come to you thru two ethernet ports ?
    2) Are the links from the same or different ISP ?
    3) If it is the same ISP it announces contiguos IP or not ?
    (eg half of a C class in a link and the other on the second one ?)
    4) If it is not the same ISP do you want to achieve a sort of failover just in case one link goes down ?
    5) Do you want to have services on public ips in both link ?

    I will try to send you an example of policy routing based
    on your answer ... considering that i am running in something
    like the same problem in the near future if can help you
    i am solving my future problems ....

    Basically you must tell ASL and your computers that packets sometime have not to use the default gateway but instead a static route .... I must realize entirely where and when add this sroute but if you wish i can try to follow you .... beside that it seems that this thread is ran by italians isn't it ?

    Then ciao a tutti.... 
  • hello,
    i have the same problem: two interfaces (eth1 and eth2) connected to two different internet providers and a mailserver (via NAT, Port 25) in my private network behind the third interface (eth0).

    the mailserver can only be reached over the interface with the default gateway, eg. eth1. if i change the default gateway from eth1 to eth2, the mailserver can only be reached over eth2 but not eth1.

    Would be nice if someone has a solution ...   
  • Hi all,
    my problem is near the same. I want to receive my emails via  gateway 2 (ISDN Router) and connect to the Internet via gateway 1 (DSL-Router). Gateway 2 is connected thru eth1 (DMZ) and Gateway 1 is connected thru eth2 (Internet). 
    The problem is, my email will only be forwarded when i use the ISDN-Router as default Gateway1 thru etc2.
    My email Server is behind the firewall = eth 0.

    It would be nice if someone has a solution !  
  • 1) 2 HDSL with 2 Cisco Router, 2 ethernet used on ASL
    2) Same ISP
    3) I don't know
    4) No fail over, it's same isp
    5) Yes, because we have n1 public ip on Hdsl_1 and n2 public ip on Hdsl_2, with n2 = 2 * n1.
    Actually is Hdsl_1 works and hdsl_2 not.

    Best Regards
    Fabrizio  
  • Hi all,
    i have a similar configuration and following work fine for me:

    eth0 Internal
    eth1 External_HDSL (Mail/Web/Ftp servers)
    eth2 External_Fiber

    default gw on eth2

    NAT/Masquerding Rules:
    1) Dnat/Snat
    -- Packet to match - source: eth0_network - Destination: eth1_network - Service: :: No Match ::
    -- Change source to: :: MASQ on 'External_HDSL' ::
    -- Change destination: :: No Change ::
    2) Masquerade eth0_network on eth2 

    I reach the Mail/Web/Ftp servers over the eth1 NIc even if i have the default gw over eth2

    Have a nice day
    Andrea 
        
  • What is your IP setup like....I am guessing that you only have one gateway running. on your nics which is eth2. The poblem that I have in a differnt post and everyone else here has is that once 2 gateways are on the firewall everything goes to hell. And no one here has ever been able to say how to add static routes under astaro. I have 5 nics to GWs and one Public range for my DMZ that has to route through a specific GW otherwise the DMZ is hosed. My temporary work around was to throw up a cheap Linksys Cable/DSL router put a secondary GW on my windows network and enter manual routes via a command prompt into my workstations and they now know which gateway to route the traffic through but I lose Firewall functions on the secondary gateway this way. Kind of funny how the Linux Heads swear by linux and its flexability and 5 months later no one on the forum has a clue on getting 2 gateways running and I can do it on a Windows system in under a minute....hmmmm now there is food for thought  [:$]  
  • If the ASL has 6 interfaces as suggested then we would need a better way to visualize the set-up and needs.  Hard to picture where it is falling down.

    ASL 4 can have multiple gateways with a priority order to them but that isn't the problem.  You can easily add static routes right in webmin.

    If there are two interfaces pointing at the internet and there is a problem with DMZ traffic coming in via the non default gateway then a DNAT is the answer if policy routing doesn't work (it should).

    You would DNS a DMZ server to the internet IP instead of the real IP and DNAT it over to the DMZ.  This should send the reply back down the desired GW.  You would set default GW on both internet interfaces and decide which is the primary.

    And I seriously doubt that Linux is lacking in routing capabilities vs any Windows version.  Matter of correct structure and then config.
      
  • Youre suggestion causes a number of problems. The Static routes in webadmni don't work period. DNAT would reassign a Public address to the Gateway address instead of it own address which causes problems if you have multiple Public addresses that need to use their own addresses. Also it doesn't resolve the problem of the Private IP utilizing the secondary gateway which is needed. I can't beleive this problem has been bounced around this forum for over 5 months and no one knows how to get around this limitation. I guess ASL personel dont monitor these forums.