Can I use the Raspberry Pi as a Linux firewall?
Can anyone tell me the best way of doing this? Including network connection details and hardware I may need.
Can I use the Raspberry Pi as a Linux firewall?
Can anyone tell me the best way of doing this? Including network connection details and hardware I may need.
You will want to add a second network connection to you Pi (either a usb to ethernet or WiFi dongle. Then you will want to install iptables and configure it as a home router.
Having said that you will likely have performance issues going this route. In the end you may be better off picking up an older router that supports dd-wrt that allows you to customize the way your router works (traffic shaping, DNS server etc.)
iptables
directly. I would use shorewall
or ufw
to set up the firewall. You strictly doesn't need two network connections, you can run run more then one IPv4-net on same connector.
shorewall
or even ufw
is a better choice. There are really so many things to consider so it's better to use others knowled here. But it's not that hard to look at the output from sudo iptables -L
if you are interested. Don't forget to use ip6tables
to firewall your IPv6 net. ufw
has rules for that to.