2wan-1lan dual port forward


#1

Hello

(Sorry for my bad english)
I have an installed vyos 1.0.4 with dual WAN (load balance/failover) and single LAN.
I need a port forward from the two WAN interface to a server in the LAN.
(same port to same ip)

Info: if i set a port forward to 1 wan - 1 lan interface, its working well, but the dual forwarding
working only randomly.

wan1 ip: 192.168.0.100 gw: 192.168.0.1
wan2 ip: 192.168.1.100 gw: 192.168.1.254
lan ip: 172.16.0.0/21 (running service: ssh,dns,dhcp,vpn)

inside server ip/port: 172.16.0.150:8080

firewall is currently unset! It’s a clear install, and everything working well, excpect the port forward.

Could help anybody?


#2

can you copy your NAT configuration and your routing table ?

Since the routing decision is made prior the NAT, it may be due this case :

packet arrive from WAN1 , is NATed
response is routed to WAN2 gateway but is nated back with WAN1 Ip address -> cannot work.

note : I doubt your LAN IP is 172.16.0.0 :wink:


#3

Hello

i will post the config if i will in workplace… thx


#4

have a look here :
http://vyos.net/wiki/How_to_make_inbound_WAN_connections_sticky_to_the_interface


#5

Thx!

I will try it tomorrow…


#6

Hi!

So, i try that, and working well, but i have anothet problem…

when i used vyos 1.0.3, the load-balance worked well, but in the 1.0.4 version the balancer randomly changed the client (wan)gw. I test my (wan) IP, and randomly get back the wan1/wan2 ip address. wtf??? I need a sticky connection to route my clients out “static wan gw” such us client1=> wan1 / client2 => wan2. Of course if any wan connection lost, change the default gw all of clients. (wan failover working well yet!)