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 Gatways on V4 Please Help

I just redid my Firewall I have 5 nics.....

Eth0 "DSL"- DSL Line 100.100.100.2 255.255.255.252 GW: 100.100.100.1

Eth1 "Internal" - 192.168.2.1 255.255.255.0 No GW Masq via "Cable"

Eth2 "DMZ" - Public Block via DSL Line 100.100.100.176 255.255.255.240 GW: 100.100.100.2

Eth3 "TheVault" - 192.168.254.1 255.255.255.0  NO GW - SNAT out accross addational IP on DMZ

Eth4 "Cable" - DHCP

The problem is once I turn on the Cable interface I lose all routing accross my DMZ. I have even tried entering a static gateway for the DMZ block which points to the 100.100.100.2 network "DSL" with no luck it will show it enetered in the options page put on the main interface status page it shows no gateway. I need all traffic from the DMZ to go out through the DSL interface. It seems that once eth4 is turned on it becomes the default GW. I want DSL to be the default and Cable to be only used for masquareding and for HTTP proxy and thats it. Everything else should go out across DSL including SMTP proxy.

Please Help. Thanks 

BTW...all IP addresses are fictitious  


This thread was automatically locked due to age.
  • You can only have 1 default gateway.  This is the place where all traffic goes that the router has no other place defined for it.

    If you want "certain" traffic to go out a certain interface you will need to define static routes for it.  However you only want to have 1 default gateway defined on your box.  In your case probably the dsl interface should be the only one with a default gateway defined. 
  • There has to be a way to do it. I have to have a gateway for the cable which btw is DHCP given in order for it to go out. I just need some way to do a route thats say all traffic from DMZ goes out on DSL its that simple...I just need to know how to add it from the command line becuase there is no way to do it from the web interface.   
  • Almost there....some insight Please:

    I issued the following commands from the root prompt:

    ip rule add 100.100.100.1 lookup 100
    ip rule add from 100.100.100.176/28 lookup 100
    ip rule add default via 100.100.100.1 dev eth0 table 100

    At this point DMZ goes out on DSL and masquearding works on Cable. The problem I have now is that my SMTP proxy isnt sending email to my mail sever on the DMZ and I have a second IP on DMZ which SNATs to an addiotal IP address on The DMZ network on eth2......

    Please help with this last jump....Thanks in advance.

    BTW if I turn cable interface everything works....  
  • Hi PC-Doc,
    for this definition :
    Eth2 "DMZ" - Public Block via DSL Line 100.100.100.176 255.255.255.240 GW: 100.100.100.2
    because of the subnetmask your Gateway is not in the same ip-network as your asl-eth2 .

    firebear   
  • Sorry, my bad the IPs were fictious GW: No Gateway should route to 100.100.100.2 on Eth1. Guys this can't be that hard or Linux is really screwed up OS. I temporarily setup cable modem on a DSL/Cable router and setup the IP as 192.168.2.254 and just added a couple of routes to tell the workstation which GW to use for which network. If I can do that on a XP workstation within a minute and its been 2 days and can't do it on a Linux Firewall thats pathetic. I do not want to use that cable DSL router its a tempoary patch until and end-user or some Astaro individual can figure this out.

    Thanks  
  • I think your issue is you have default gateways defined on each interface.  You can NOT have more than one default gateway on a machine.  Otherwise how does it know where to send data if it has more than one.

    Now if you want specfic data to go out a particular interface, you need to define a static route for that data.  Is the only way I know how to make that work.  Setting up IP filter rules for this I do not think is the solution. 
  • Agreed, the filter was sending data out on a specified ip adress not relaying it as it should. However I need help in defining those static routes. In windows I can do it with my eyes closed by issuing the route command from a command prompt. And not joking, I had the two gateways specified above on the workstation up within a minute. But it seems everyone on this forum has asked for the same help I am asking for over the past 5 months and no one has given an answer on how to take care of this problem on Astaro. 

    In windows i did:

    Made the cable router 192.168.2.254 the default gateway and made the firewall the secondary gateway 192.168.2.1 then issued route #.#.#.# mask #.#.#.# #.#.#.#.#.# for anything that needed to go through the firewall and everything else ie..surfing the web went out through the cable modem. Simple, easy and it seems everyone here has been pulliing their hair out getting the same exact thing to work on astaro.