PDA

Bekijk de volledige versie : iptables reports "ACCEPT" arg not valid



psylockex
23-08-2004, 20:36
I am running 1.7.5.9-CR5

I had problems with the WAN/LAN filter dropping connections even though they were specified with a rule so I read Olegs wl500g.dyndns.org and decided that maybe the better way was to use post-firewall script but now I am faced with another issue....

I created /usr/local/init
[mkdir -p /usr/local/init]

Then created the post-firewall script with only a couple of entries to start with :

# iptables -A INPUT -i "$1" -p udp --dport 500 -j ACCEPT
# iptables -A INPUT -i "$1" -p udp --dport 4500 -j ACCEPT

I changed the access to execute for the post-firewall
[chmod -x post-firewall]

Then performing the check as suggested /usr/local/init/post-firewall I get the following :

iptables v1.2.7a: Unknown arg `ACCEPT'
Try `iptables -h' or 'iptables --help' for more information.

Can someone tell me what is wrong with what I have done?

Many Thanks.

sodb
23-08-2004, 21:12
I tried it on my 1.7.5.9.cr5 system and it gave no errors:


iptables -A INPUT -i eth1 -p udp --dport 500 -j ACCEPT

Did you try to enter the above command from the command line? It seems that you need an extra space in yout script between -i and "$1". If that does not work try to echo $1 or replace $1 with WAN interface manually.

Success