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: 39094
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
allfox
Posts: 452
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: 39094
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

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: 39094
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “General discussion”