|
2007-04-28
, 09:37
|
|
Posts: 919 |
Thanked: 37 times |
Joined on Aug 2006
@ /dev/null
|
#2
|
|
2007-04-28
, 11:28
|
|
Posts: 95 |
Thanked: 6 times |
Joined on Apr 2007
@ the Imperial Homeland
|
#3
|
|
2007-04-28
, 13:42
|
Posts: 245 |
Thanked: 25 times |
Joined on Apr 2007
|
#4
|
#!/bin/sh iptables -F iptables -A INPUT -p all -s 127.0.0.1 -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables -A INPUT -p tcp --syn -j DROP
The Following User Says Thank You to gsagers For This Useful Post: | ||
|
2008-12-10
, 15:06
|
Posts: 47 |
Thanked: 10 times |
Joined on Jan 2008
@ UK
|
#5
|
|
2008-12-10
, 15:47
|
|
Posts: 546 |
Thanked: 85 times |
Joined on Feb 2008
@ Winnipeg, Canada
|
#6
|
|
2008-12-10
, 16:34
|
|
Posts: 531 |
Thanked: 79 times |
Joined on Oct 2006
@ This side of insane, that side of genius
|
#8
|
vi /etc/sysconfig/iptables
|
2008-12-10
, 16:40
|
|
Posts: 546 |
Thanked: 85 times |
Joined on Feb 2008
@ Winnipeg, Canada
|
#9
|
|
2008-12-10
, 17:20
|
|
Posts: 3,397 |
Thanked: 1,212 times |
Joined on Jul 2008
@ Netherlands
|
#10
|
I know nothing about iptables, but wouldn't it be "proper" to issue the above commands in the shell to set up the firewall, then use something like 'iptables-save > /etc/iptables.conf' & then just have the rc script call 'iptables-restore < /etc/iptables.conf'? Or am I making things too complicated, as usual?
iptables -F # Clears INPUT, OUTPUT, FORWARD rules iptables -P INPUT DROP # Change INPUT policy to DROP iptables -A INPUT -p all -s 127.0.0.1 -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables-save >/etc/iptables.conf
iptables-restore </etc/iptables.conf
Nokia's Internet tablets are pretty secure out of the box, ports are well closed, but a small firewall never hurts. Alas, I have not found one (so far). So here is a small hack:
open an editor and create a file with this inside:
#!/bin/sh
iptables -F
iptables -A INPUT -p all -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p tcp --syn -j DROP
save it, and make it executable (chmod +x). Then, run it as root.
You will have a very basic, but solid, firewall.
HTH,
VS
Motto: chown -R linux:GNU world
http://vineyardsaker.blogspot.com/