Page 1 of 1

Raspberry Pi connected to the Internet

Posted: Wed Jun 20, 2012 8:01 pm
by simonthepiman
Hi Guys

I have a simple tutorial to protect a Raspberry Pi web server so it can be connected to the Internet
http://www.simonthepiman.com/how_to_set ... ternet.php
happy to modify if anyone notices anything incorrect

Re: Raspberry Pi connected to the Internet

Posted: Wed Jun 20, 2012 9:25 pm
by jbeale
Thanks for posting this- I think everyone with a network-reachable box should be thinking about security at least a little bit. In the line-by-line descriptions, I think one was copy and pasted... shouldn't these two lines have different descriptions? I think the second one should read differently as it seems to be allowing 'ping' (based on http://wiki.debian.org/iptables ), rather than dropping ssh

Code: Select all

-A INPUT -s 192.168.1.1/32 -i tcp -p tcp -m tcp --dport 22 -j DROP
- However block any traffic to port 22 (ssh) coming from your firewall
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
- However block any traffic to port 22 (ssh) coming from your firewall

Re: Raspberry Pi connected to the Internet

Posted: Thu Jun 21, 2012 1:33 am
by AndrewS
I'd personally put changing the default password higher up the list of tasks :)
And you might want to explain in step 6 what's special about ports 80 and 443.
I never bothered to learn iptables, but there's some other stuff here http://www.raspberrypi.org/phpBB3/viewt ... =63&t=8472 and make sure you checkout the other thrread I link to in the last post. Plenty to sink your pie-teeth into ;)
Maybe a brief overview of (or link to another webpage about) port-forwarding, for users whose router doesn't have a DMZ?

Re: Raspberry Pi connected to the Internet

Posted: Thu Jun 21, 2012 7:32 am
by simonthepiman
Andrew many thanks for your comments - I would rather get the tutorial right, so will make the changes suggested - Yes I did copy the Port 22 line - cut and paste can be a bad thing sometimes

Re: Raspberry Pi connected to the Internet

Posted: Thu Jun 21, 2012 7:33 am
by simonthepiman
Sorry jbeale thanks go out to you as well :geek:

Re: Raspberry Pi connected to the Internet

Posted: Thu Jun 21, 2012 8:18 am
by bigsi111
Thanks for the guide, I'll read it later.

Re: Raspberry Pi connected to the Internet

Posted: Sat Jun 23, 2012 1:26 pm
by ren41
I've installed a little firewall called firestarter. It seems to be functioning well, allows you to wire your own policies, etc. has anyone else come across it?

ren