Raspberry pi running arch linux connected to two different wan ports(wifi and ethernet) I want to disable intenet access and keep local access

Please if anyone can help that is really appreciated.

I have a unique setup I think.
I have a raspberry pi running pikvm. I have two internet connections at home (Xfinity and ATT)
xfinity connected via –> ethernet port (MAIN)
ATT connected vis –> Wifi (second using as backup)

  1. I want to stop all internet traffic and only allow local traffic to this device (without having to use router application)
  2. I want to able to isolate Ethernet from Wi-Fi. ( I don’t want them to know that the other exists. This way they are on there own and only accessible.

    Please if anyone can help that is really appreciated.

**What I have tried so far**.
After applying this setting I am still able to ping google.com. I have disable internet access to both of these devices via the att and xfinity routers. but it doesn’t seem to stop ipv6 pinging .

iptables -I INPUT 1 -p udp –dport 67:68 –sport 67:68 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -s 10.0.4.0/24 -j ACCEPT
iptables -A INPUT -j DROP
iptables -A OUTPUT -s 192.168.1.0/24 -j ACCEPT
iptables -A OUTPUT -s 10.0.4.0/24 -j ACCEPT
iptables -A OUTPUT -j DROP
iptables -I INPUT -p udp –m multiport –dports 1 – 65535 -j REJECT
iptables -A INPUT -p udp –match multiport –dports 1:65535 -j DROP

Read more here: Source link