the eth0 has multiple public addresses, like below, and I wanna set certain of eth0’s public addresses(5.6.7.8 as below) can only be access through (1.2.3.4).
Am I configuring it wrongly? Pls kindly help!
# declare zone and put interface into zone
set firewall zone WAN interface eth0
set firewall zone LAN interface eth1
# declare firewall rule "from-wan-to-lan"
set firewall ipv4 name from-wan-to-lan description 'WAN to LAN'
set firewall ipv4 name from-wan-to-lan default-action accept
# set firewall ipv4 name "from-wan-to-lan"
set firewall ipv4 name from-wan-to-lan rule 10 protocol all
set firewall ipv4 name from-wan-to-lan rule 10 action drop
set firewall ipv4 name from-wan-to-lan rule 10 source address !1.2.3.4
set firewall ipv4 name from-wan-to-lan rule 10 destination address 5.6.7.8 # <- this cause firewall fail
# declare firewall rule "from-lan-to-wan"
set firewall ipv4 name from-lan-to-wan description 'LAN to WAN'
set firewall ipv4 name from-lan-to-wan default-action accept
# apply firewall
set firewall zone WAN from LAN firewall name from-lan-to-wan
set firewall zone LAN from WAN firewall name from-wan-to-lan
Everythings works fine until I added the, this cause the rule not working:
set firewall ipv4 name from-wan-to-lan rule 10 destination address 5.6.7.8