Hi!
I’m configuring 2nd router, setup very similar to previous, 2 x ISP uplinks, DMZ 192.168.1.x and local net zone 192.168.0.x, this time without load-balancing. Copied most of the VyOS commands from 1st, yet encountered some strange artifacts.
Static routing for 2 ISP uplinks:
set protocols static route 0.0.0.0/0 next-hop ‘isp1.gw1.xx.xx’ distance 10
set protocols static route 0.0.0.0/0 next-hop ‘isp2.gw2.yy.yy’ distance 100
Zones defined as following:
set zone-policy zone ZONE-WAN interface eth0
set zone-policy zone ZONE-WAN interface eth1
set zone-policy zone ZONE-DMZ interface eth2
set zone-policy zone ZONE-INT interface eth3
DNAT from WAN to DMZ zone working OK (WAN and DMZ ports are the same).
-
I have temporary server in INTERNAL zone which should be accessible from outside for same time.
… other rules FW-WAN-INT …
set firewall name FW-WAN-INT rule 510 action accept
set firewall name FW-WAN-INT rule 510 protocol tcp
set firewall name FW-WAN-INT rule 510 destination port 99
…
set zone-policy zone ZONE-INT from ZONE-WAN firewall name FW-WAN-INTset nat destination rule 510 description ‘WAN-eth1-TO-INT’
set nat destination rule 510 protocol ‘tcp’
set nat destination rule 510 destination port 99
set nat destination rule 510 destination address isp1.ip1.xx.xx
set nat destination rule 510 inbound-interface ‘eth0’
set nat destination rule 510 translation address 192.168.0.xx
set nat destination rule 510 translation port 9999set nat destination rule 511 description ‘WAN-eth1-TO-INT’
set nat destination rule 511 protocol ‘tcp’
set nat destination rule 511 destination port 99
set nat destination rule 511 destination address isp1.ip1.xx.xx
set nat destination rule 511 inbound-interface ‘eth1’
set nat destination rule 511 translation address 192.168.0.xx
set nat destination rule 511 translation port 9999
In previous router with load-balancing that worked. Yet in current, without load-balancing, it doesn’t.
If I change
set firewall name FW-WAN-INT rule 510 destination port 99
to
set firewall name FW-WAN-INT rule 510 destination port 99, 9999
it works.
What is a cause of such weird behavior ?
- Access from outside to DMZ server via eth0 works OK. From eth1 it starts to function only after I ping from router to gateway isp2.gw2.yy.yy via eth1. Of course, I can set timed cron script which ping gateway, yet is kinda awkward. Any idea why this happens?
Thanks in advance for any suggestion(s).