User avatar
simonthepiman
Posts: 43
Joined: Mon Jun 04, 2012 11:42 am
Location: Battle - Sussex
Contact: Website

Raspberry Pi connected to the Internet

Wed Jun 20, 2012 8:01 pm

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
Simon

http://www.simonthepiman.com (Beginners guides)

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi connected to the Internet

Wed Jun 20, 2012 9:25 pm

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

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Raspberry Pi connected to the Internet

Thu Jun 21, 2012 1:33 am

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?

User avatar
simonthepiman
Posts: 43
Joined: Mon Jun 04, 2012 11:42 am
Location: Battle - Sussex
Contact: Website

Re: Raspberry Pi connected to the Internet

Thu Jun 21, 2012 7:32 am

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
Simon

http://www.simonthepiman.com (Beginners guides)

User avatar
simonthepiman
Posts: 43
Joined: Mon Jun 04, 2012 11:42 am
Location: Battle - Sussex
Contact: Website

Re: Raspberry Pi connected to the Internet

Thu Jun 21, 2012 7:33 am

Sorry jbeale thanks go out to you as well :geek:
Simon

http://www.simonthepiman.com (Beginners guides)

User avatar
bigsi111
Posts: 66
Joined: Thu Apr 19, 2012 8:50 am

Re: Raspberry Pi connected to the Internet

Thu Jun 21, 2012 8:18 am

Thanks for the guide, I'll read it later.

ren41
Posts: 99
Joined: Sat May 26, 2012 8:00 pm

Re: Raspberry Pi connected to the Internet

Sat Jun 23, 2012 1:26 pm

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

Return to “Beginners”