2011/11/14 watson <wat...@gmail.com>:
> Try running iptables-restore on the local-ssh.ipt file.
> Iptables has two forms of output. The first is generated with a 'target::
> speedway', the second with a 'target:: iptables'. Only the output file with
> the .ipt extension is usable by iptables-restore command, the other file is
> only suitable for passing each line manually to /sbin/iptables commandline.
Ah, so I mixed up which one to use. Ok, got that.
I missed to say that the .ipt file also errors :)
This gives the following error:
root@xen04:/opt/wfmanage/software/capirca# iptables-restore <
filters/local-ssh.ipt
iptables-restore v1.4.10: no command specified
Error occurred at line: 16
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
root@xen04:/opt/wfmanage/software/capirca# cat filters/local-ssh.ipt
*filter
# Speedway INPUT Policy
# Input filter
#
# $Id:$
# $Date:$
# inet
-N I_permit-ssh-services
-A I_permit-ssh-services -p tcp --dport 22 -d 188.40.175.3/32 -m state
--state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j I_permit-ssh-services
-N I_default-deny
-A I_default-deny -p all -j DROP
-A INPUT -j I_default-deny
Ah. And looking at the header I have an error in the target part of
the policy file, right?
# Test / First definition
header {
comment:: "Input filter"
target:: speedway INPUT
target:: iptables INPUT <- must be wrong since both generated files
are saying speedway.
}
I'll be back at this tonight - thank you so much for the reply!
Florian
Small followup:
On Nov 14, 8:41 am, Florian Heigl <florian.he...@gmail.com> wrote:
> Hi,
>
> 2011/11/14 watson <wat...@gmail.com>:
>Ok.
> > Try running iptables-restore on the local-ssh.ipt file.
> > Iptables has two forms of output. The first is generated with a 'target::
> > speedway', the second with a 'target:: iptables'. Only the output file with
> > the .ipt extension is usable by iptables-restore command, the other file is
> > only suitable for passing each line manually to /sbin/iptables commandline.
Lessons learned:
1. The speedway file writes the file named .ipt and the iptables
module writes the one not called .ipt. Errr. Not obvious ;p
2. The .ipt file will not load.