slimserver and firewall
Christopher K. Johnson
ckjohnson at gwi.net
Tue Feb 7 04:08:06 UTC 2006
Gerhard Magnus wrote:
>root at PuteA Mon Feb 06 16:11:48
>[268] /home/magnusg $ iptables -I INPUT -s 192.168.1.0/24 -p udp --dport
>9000 -j ACCEPT
>
>Entering "iptables-save" before rebooting doesn't work; "iptables-save
>-c" as it says in the "Red Hat Linux Bible" doesn't work either. What's
>the right command here, in FC4?
>
>Thanks again for the help.
>Jerry
>
>
>
You have choices. First of all iptables-save does work, but it writes
by default to stdout, not to /etc/sysconfig/iptables which is the rule
file loaded by the iptables service upon startup. So you could redirect
output from the command to that file:
'iptables-save >/etc/sysconfig/iptables'
Second you could tell the iptables service script to save it for you:
'service iptables save'
Or third, you could edit /etc/sysconfig/iptables yourself to insert the
lines
# Permit access to slimserver
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -p udp --dport 9000 -j ACCEPT
right below the line:
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
The latter method will preserve comments in that file, while the first
two methods will destroy them.
Chris
--
"Spend less! Do more! Go Open Source..." -- Dirigo.net
Chris Johnson, RHCE #804005699817957
More information about the users
mailing list