Avatar billede tingleff Praktikant
04. april 2005 - 21:15 Der er 1 kommentar

firewall iptables

hej alle

jeg 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????
Avatar billede tingleff Praktikant
07. april 2005 - 12:15 #1
når ikke :(
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester