K.Kong
Posts: 45
Joined: Fri Oct 26, 2012 1:55 am

Is there a built-in firewall?

Fri Sep 18, 2015 5:39 am

Does the Pi have a built-in firewall?

Are all ports for incoming traffic open by default on the LAN interface?

Thanks

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: Is there a built-in firewall?

Fri Sep 18, 2015 6:45 am

A network port is only open if a software application opens it. There's nothing 'built-in' that will prevent a port from being opened and made available to anything that can address it.

fruitoftheloom
Posts: 21077
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Is there a built-in firewall?

Fri Sep 18, 2015 7:05 am

K.Kong wrote:Does the Pi have a built-in firewall?

Are all ports for incoming traffic open by default on the LAN interface?

Thanks
AFAIAA the Operating Systems available for the Raspberry Pi SBC do not come pre-configured with a Firewall

If you wish to implement a Firewall in a Linux Distro then install ufw from its repository..

The Uncomplicated FireWall is a front-end for iptables, to make managing a Netfilter firewall easier. It provides a command line interface with syntax similar to OpenBSD's Packet Filter. It is particularly well-suited as a host-based firewall.
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

ghans
Posts: 7878
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Is there a built-in firewall?

Fri Sep 18, 2015 7:19 am

netfliter is part of the Linux kernel. So i would say yes , every Linux-based Raspberry Pi OS like Raspbian comes with a firewall.
The problem is of course that it is not configured according to your needs (it's propably not even enabled).
Only you know how to do that , since you know your needs the best.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

K.Kong
Posts: 45
Joined: Fri Oct 26, 2012 1:55 am

Re: Is there a built-in firewall?

Fri Sep 18, 2015 8:34 am

Sorry, forgot to mention that mine is the Raspbian.

I was installing pptpd and this iptables thing came up. I then looked up iptables and wikipedia says "iptables is a user-space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall "

That got me confused whether certain things were blocked by default as I was experiencing some network difficulties in another application in another Pi.

User avatar
rpdom
Posts: 15580
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Is there a built-in firewall?

Fri Sep 18, 2015 12:45 pm

Nothing is blocked on a default Raspbian installation.

You can check that with the iptables command. It should show that all three standard chains are set to ACCEPT all packets, with no other rules in place.

Code: Select all

[email protected] ~ $ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination      

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

Re: Is there a built-in firewall?

Fri Sep 18, 2015 9:02 pm

K.Kong wrote: Are all ports for incoming traffic open by default on the LAN interface?
Ports are only open if you're running a listener.

If you're new to iptables then you will find configuring it is much easier with Fruity's UFW (user-friendly fire wall) package.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Woll
Posts: 472
Joined: Mon Jul 06, 2015 2:14 am
Location: Cloud Cuckoo Land

Re: Is there a built-in firewall?

Sat Sep 19, 2015 12:25 am

This link has info about a Raspi firewall.

http://www.makeuseof.com/tag/securing-r ... firewalls/
Who ate all the Pi's? Who ate all the Pi's?
Boris Johnson, Boris Johnson,
Who ate all the Pi's?

Return to “Advanced users”