VladyslavVolskyi
Posts: 5
Joined: Sun Jan 07, 2018 10:07 pm

How test firewall on raspberry pi???

Sun Jan 21, 2018 7:30 pm

Hi Guys,

I want to achieve difficult firewall on Rpi, which will filter trafic from 10 different machines->eth1->eth0->Internet.

But before using it in my project, a want to test how efficient(productive) this firewall is. So i need to create rules, which will filter all trafic, but i don't know how can i test, which ports/services/packets should i filter. Could i tell me some examples, which i can use e.g filter http packets.

I already have some simple rules, but can't think up more difficult rulles, filterin internet trafic.
Help please!!!
:o :o

User avatar
DougieLawson
Posts: 32364
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: How test firewall on raspberry pi???

Sun Jan 21, 2018 7:44 pm

sudo apt install ufw gufw

Use gufw to control your uncomplicated filewall (ufw). Use ufw to write the iptables and ip6tables rules for you.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
allfox
Posts: 420
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: How test firewall on raspberry pi???

Sun Jan 21, 2018 8:15 pm


User avatar
DougieLawson
Posts: 32364
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: How test firewall on raspberry pi???

Sun Jan 21, 2018 8:17 pm

allfox wrote:
Sun Jan 21, 2018 8:15 pm
To learn the iptables: http://www.iptables.info/en/iptables-contents.html
... and enjoy a new level of suffering which is hidden from you with ufw.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

VladyslavVolskyi
Posts: 5
Joined: Sun Jan 07, 2018 10:07 pm

Re: How test firewall on raspberry pi???

Sun Jan 21, 2018 8:36 pm

But could You suggest me which rules, to your mind, i should make, which trafic accept / drop.

User avatar
DougieLawson
Posts: 32364
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: How test firewall on raspberry pi???

Sun Jan 21, 2018 9:14 pm

What services are you running? Only open the ports (22, 80, 443) for things you need, everything else is blocked.

I also run fail2ban as intrusion detection system, that writes dynamic iptables rules based on what it detects in various logs.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

Return to “General discussion”

Who is online

Users browsing this forum: Pan Szymanowski and 8 guests