Author Topic: routing for a specific IP address or domain  (Read 1618 times)

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 145
  • Karma: +4/-0
    • View Profile
routing for a specific IP address or domain
« on: September 19, 2012, 01:45:15 pm »
I have 2 broadband connections into my zentyal server. 

eth0 is the LAN connection
eth1 is for general internet traffic
eth2 is connected to a separate router provided by a specific provider to connect to their server. 

How do I configure my zentyal server to forward traffic for a specific IP address or domain name to eth2 and everything else to eth1?? 

Thanks

 

christian

  • Guest
Re: routing for a specific IP address or domain
« Reply #1 on: September 19, 2012, 03:34:46 pm »
I'm not sure my answer is the clevest but I would use static route in Network section.
Using balancing feature in Network/gateways section and relying on traffic balancing would have, for what I understand, a potentially diffent effect, although it may provide better flexibility.

Rephrasing this: if you want to redirect all protocols to specific subnet (i.e. your service provider) then use static route, otherwise define rules for services AND subnets or IPs you want to redirect thank to traffic balancing.

Again, take it with bit of salt: I'm not 100% sure to be right, especially because I tried tried balancing rules with no success. Doc was not clear enough for me  :-[

azchas

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: routing for a specific IP address or domain
« Reply #2 on: September 19, 2012, 07:20:52 pm »
Hi Barry,

I have a similar setup and I use the multi-gateway rules to accomplish what you are wanting.

You have 2 external gateways and both should be listed on the Network/Gateways page. Click on the Balance Traffic tab, enable traffic balancing, then go down and add a new multi-gateway rule. The rule lets you route traffic matching certain criteria that you specify to your choice of the 2 gateways.

So, for instance, I want all ftp uploads to a particular website to go through my 2nd gateway. I have a rule that specifies that traffic originating on any interface with a destination IP of x.x.x.x and using the FTP service should be routed to gateway 2.

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 145
  • Karma: +4/-0
    • View Profile
Re: routing for a specific IP address or domain
« Reply #3 on: October 19, 2012, 11:17:28 am »
Thanks azches,

Is it possible to use a host name or domain name rather than an IP address in the multi gateway rules?  ie for requests for hostserver.ispdpmain.com to go via eth2

Thanks