View previous topic :: View next topic |
Author |
Message |
Eden n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Aug 2006 Posts: 21
|
Posted: Tue Jan 16, 2007 4:06 pm Post subject: Some iptables problems |
|
|
I'm trying to set up a basic iptable setup from the wiki guide http://gentoo-wiki.com/HOWTO_Iptables_for_newbies I save the iptables and edit it with the following (the same rules as in the guid but with a couple extra).
Code: | # Generated by iptables-save v1.3.5 on Tue Jan 16 15:34:30 2007
*filter
:INPUT ACCEPT [926:70821]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [741:169405]
# accept all from localhost
-A INPUT -s 127.0.0.1 -j ACCEPT
# accept all previously established connections
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# ssh
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
# ftp / webserver related
-A INPUT -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
# Windows / Samba
-A INPUT -p tcp -m state --state NEW -m tcp --dport 137:139 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 426 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT
# up to 5 Bit-torrent connections
-A INPUT -p tcp -m state --state NEW -m tcp --dport 6881:6886 -j ACCEPT
#Teamspeak
-A INPUT -p tcp -m state --state NEW -m tcp --dport 14534
-A INPUT -p tcp -m state --state NEW -m tcp --dport 51234
-A INPUT -p udp -m state --state NEW -m udp --dport 8767
# reject everything else
-A INPUT -j REJECT --reject-with icmp-port-unreachable
COMMIT
# Completed on Tue Jan 16 15:34:30 2007 |
However when I go to restore it I get the following error.
Code: |
# iptables-restore /etc/iptables.bak
iptables-restore v1.3.5: no command specified
Error occurred at line: 38
Try `iptables-restore -h' or 'iptables-restore --help' for more information. |
Line 38 is the 'COMMIT' line.
anyone have any suggestions? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Tue Jan 16, 2007 6:11 pm Post subject: |
|
|
Generally caused by insufficient kernel support. If you've gone the modular route you either lack some option(s) or have failed to load the module. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|