Redirect all traffic through my Raspberry PI [closed]
-
It should be capable to work; usually home routers which also are software routers with little HW accel are built upon wa-a-ay less powerful processors than RasPi 4B. But this also depends on many details of configuration. Just try and test it.
-
Just have default route and enable IPv4 forwarding (
sysctl.conf
,net.ipv4.ip_forward = 1
) on RPi, that's basically it. Then you'll be able to specify it as default gateway on other systems and it will work. But I don't know default network configuration on RPi, you may need also to disable redirects (in thesysctl.conf
, where you enabled forwarding, setnet.ipv4.conf.all.send_redirects = 0
andnet.ipv4.conf.default.send_redirects = 0
). It may be needed for RPi to not to issue notifications to hosts: "I forwarded this packet for you, but you can do it yourself, use .1.1 directly". -
This was answered on another site: https://askubuntu.com/questions/592042/iptables-redirect-dns-queries This is perfectly applicable for your case.