Add a second subnet without Internet access

my setup is a PC with 3 eth cards:

  • WAN, pppoe
  • LAN 192.168.160.0/24
  • empty

in the empty port i would like to attach via static IP, si could access a different device. The port needs to have the IP 192.168.178.250/24. i would like this subnet to be seen from LAN subnet, but the new subnet, should NOT have access to Internet via the OpenWRT.

need some help, as i copied everything from my LAN and it has access to net. i would appreciate some help with the config please.

here is the config:

/etc/config/network

config interface 'Subnet2_FritzBox'
        option proto 'static'
        option device 'eth2'
        option ipaddr '192.168.178.250'
        option netmask '255.255.255.0'

Assuming the name of the LAN firewall zone is the default one (lan):

uci add firewall zone
uci set firewall.@zone[-1].name='fritzbox'
uci set firewall.@zone[-1].input='ACCEPT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='REJECT'
uci set firewall.@zone[-1].network='Subnet2_FritzBox'

uci add firewall forwarding
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='fritzbox'

uci commit firewall
/etc/init.d/firewall restart
1 Like