I can't find out how to create a fw3 rule which does what I want (block all traffic from 192.168.1.119). I have this in /etc/config/firewall
config rule
option name 'Block client egress'
option src 'lan'
option src_ip '192.168.1.119'
option dest 'vpn'
option proto 'all'
option target 'REJECT'
But that essentially is converted into
iptables -A zone_lan_forward -s 192.168.1.119/32 -j zone_vpn_dest_REJECT
And "vpn" is just the name of a corporate VPN that all WAN traffic is forwarded to. This doesn't work (connections go through and don't get rejected), so I want a fw3 rule that does this (which DOES work):
iptables -I FORWARD -s 192.168.1.119/32 -j REJECT
How do I set up a fw3 rule that turns into that?
Here are the chains btw which I think are causing the problem (because plain FORWARD and REJECT for what I need):
root@OpenWrt:~# iptables -S zone_lan_forward
-N zone_lan_forward
-A zone_lan_forward -m comment --comment "!fw3: Custom lan forwarding rule chain" -j forwarding_lan_rule
-A zone_lan_forward -m comment --comment "!fw3: Zone lan to vpn forwarding policy" -j zone_vpn_dest_ACCEPT
-A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
-A zone_lan_forward -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
root@OpenWrt:~# iptables -S zone_vpn_dest_REJECT
-N zone_vpn_dest_REJECT
-A zone_vpn_dest_REJECT -o tun0 -m comment --comment "!fw3" -j reject
root@OpenWrt:~# iptables -S reject
-N reject
-A reject -p tcp -m comment --comment "!fw3" -j REJECT --reject-with tcp-reset
-A reject -m comment --comment "!fw3" -j REJECT --reject-with icmp-port-unreachable
This doesn't work:
config zone
option name 'deny'
option subnet '0.0.0.0/0'
option input 'REJECT'
option output 'REJECT'
option forward 'REJECT'
config zone
option name 'lan'
list network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
config rule
option name 'Block client egress'
option src 'lan'
option src_mac 'MAC ADDR HERE'
option dest 'deny'
option proto 'all'
option target 'REJECT'