www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

Force internal host to use one interface under net balancer

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
xoy



Joined: 19 Jul 2016
Posts: 3

PostPosted: Tue Jul 19, 2016 4:45 pm    Post subject: Force internal host to use one interface under net balancer Reply with quote

I have a zeroshell setup as net balancer with 2 WAN interfaces.
However, I need a certain internal host to use only the first WAN interface when sending outbound packets (it's an IP PBX and it doesn't work properly when jumping from one WAN IP to another).
I tried adding something like this to the scripts/cron
iptables -t nat -I POSTROUTING 1 -s 1.2.3.4 -o ETH01 -j SNAT --to-source 5.6.7.8
but it only works partially - when using the ETH01 to go out, it uses the 5.6.7.8 IP address rather than the default one.
Any idea ?
Back to top
View user's profile Send private message
francozamp



Joined: 13 Jul 2016
Posts: 4

PostPosted: Wed Jul 20, 2016 2:15 pm    Post subject: Re: Force internal host to use one interface under net balan Reply with quote

xoy wrote:
I have a zeroshell setup as net balancer with 2 WAN interfaces.
I tried adding something like this to the scripts/cron
iptables -t nat -I POSTROUTING?


There is a dedicated section to add balancing "exceptions", so that you can tell which traffic goes to a specific WAN. This will also maintain the failover, so that in case of failure, still the traffic goes to the other WAN (if completely stick to the WAN with failure you will have no service at all).

F.
Back to top
View user's profile Send private message
xoy



Joined: 19 Jul 2016
Posts: 3

PostPosted: Wed Jul 20, 2016 8:00 pm    Post subject: Re: Force internal host to use one interface under net balan Reply with quote

francozamp wrote:

There is a dedicated section to add balancing "exceptions", so that you can tell which traffic goes to a specific WAN. This will also maintain the failover, so that in case of failure, still the traffic goes to the other WAN (if completely stick to the WAN with failure you will have no service at all).
F.

Is it under Net Balancer / Balancing Rules ? Could you please give me an example of how to use it ? I tried to create a rule specifying the Source IP field and TARGET GATEWAY as the gateway for the WAN I want to use, but it doesn't appear to work.
Back to top
View user's profile Send private message
xoy



Joined: 19 Jul 2016
Posts: 3

PostPosted: Tue Jul 26, 2016 7:20 pm    Post subject: Re: Force internal host to use one interface under net balan Reply with quote

xoy wrote:
francozamp wrote:

There is a dedicated section to add balancing "exceptions", so that you can tell which traffic goes to a specific WAN. This will also maintain the failover, so that in case of failure, still the traffic goes to the other WAN (if completely stick to the WAN with failure you will have no service at all).
F.

Is it under Net Balancer / Balancing Rules ? Could you please give me an example of how to use it ? I tried to create a rule specifying the Source IP field and TARGET GATEWAY as the gateway for the WAN I want to use, but it doesn't appear to work.

Bump...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group