firewall iptables
hej allejeg har et problem med et firewall script.. kan i hjælpe?
min maskine er en Debian 3.0 med kernel 2.4.20-021stab022.11.777-enterprise.
iptables version: v1.2.6a
mit script hedder fwclosed og jeg kører det ved at skrive:
sh fwclosed
Andre har kørt scriptet og på deres virker det fint.
ipchains er ikke installeret.
scriptet indeholder følgende:
#!/bin/sh
# Flush
iptables –t nat -F
iptables -F
iptables -X
iptables -Z
iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Open ports on router pc for server/services
# Rediger om det som ikke passer !
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 20 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 110 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -i eth0 -p udp --dport 53 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 3128 -j ACCEPT
# STATE RELATED for local processes on firewall machine
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
men den kommer med følgende fejl:
: command not found
modprobe: Can't open dependencies file /lib/modules/2.4.20-021stab022.11.777-enterprise/modules.dep (No such file or directory)
iptables v1.2.6a: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables: No chain/target/match by that name
iptables: Table does not exist (do you need to insmod?)
iptables: Table does not exist (do you need to insmod?)
: command not found
iptables: Bad policy name
iptables: Bad policy name
iptables: Bad policy name
: command not found
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
: command not found
'ptables v1.2.6a: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
Kan i hjælpe mig????