Ajuda com erros Script iptables

Iniciado por lfernandosg, 28 de Dezembro de 2006, 16:02

tópico anterior - próximo tópico

lfernandosg

peguei uma script que está atualmente rodando em um servidor fechado.....e coloquei alguns comentários para que possa colocá-lo em outro servidor debian e estou testando em outro computador fora de rede para não mexer nela e acontece esses erros:

Bad argument `lo'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `ACCEPT'
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: unknown protocol `tpc' specified
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `udp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `udp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `udp'
Try `iptables -h' or 'iptables --help' for more information.


como achar esses erros se o iptables não mostra a linha? e porque agora deu esses erro se só fiz alterar as duas interfaces de rede de exint/intif para if_interno/If_externo? e setei o ip no ip_interno como 10.0.1.26 que estava comectado na internet e na outra palca setei 192.168.1.1 que vai disparar para a lan local que no caso é meu notebok, outra coisa a luz da placa de rede local não acende mas ela está configurada devidamente....

esse é meu escript é meio grande por precisar de muita coisa:



############################### VARIAVEIS ######################################
IF_INTERNO="eth1"
IF_EXTERNO="eth0"
VPNIF="ipsec0"
PPPXIF="ppp+"
DMZIF="eth2"
IP_INTERNO="192.168.1.1"
IP_EXTERNO="10.0.1.26"
INTMASK="255.255.255.255"
####################### BLOQUEIA TUDO ENQUANTO SETA AS REGRAS ###############
#iptables -A INPUT -i ! lo -j DROP
#iptables -A OUTPUT -o ! lo -j DROP
######################## COMPARTILHA A INTERNET ##############################
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -j DROP
iptables -t nat -A POSTROUTING -o $IF_EXTERNO -j MASQUERADE
###################### JOGA CADA UMA PARA SEU CHAIN CHAIN ###################
iptables -A INPUT -i lo -j ACCEPT
######################### LEVANTA MODULOS ###################################
modprobe ip_nat_ftp
modprobe ip_conntrack_ftp
modprobe ip_tables
modprobe iptable_filter
modprobe ip_conntrack
modprobe iptable_nat
modprobe ipt_LOG
modprobe ipt_state
modprobe ipt_REJECT
modprobe ipt_MASQUERADE
######################## LIMPA REGRAS ########################################
iptables -F
iptables -Z
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
############################# POLITICAS ####################################
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
##################### BLOQUEIA SPOOFING ####################################
echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
##################NAO RESPONDER A PINGS###################################
#echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
####################LIBERARANDO INPUT LOOPBACK###########################
iptables -A INPUT -p ALL -s 127.0.0.1 -i lo -j ACCEPT
iptables -A INPUT -p ALL -s $IF_GW -i lo -j ACCEPT
######################## REGRAS ############################################
iptables -A INPUT -i $IF_INTERNO --dst 255.255.255.255 -p tcp --dport 67:68 -j ACCEPT # DHCP para rede interna - TCP-netmask
iptables -A INPUT -i $IF_INTERNO --dst 255.255.255.255 -p udp --dport 67:68 -j ACCEPT # DHCP para rede interna - UDP-netmask
iptables -A INPUT -i $IF_INTERNO --dst $IPINT -p tcp --dport 67:68 -j ACCEPT # DHCP para rede interna - TCP-rede interna
iptables -A INPUT -i $IF_INTERNO --dst $IPEXT -p tcp --dport 67:68 -j ACCEPT # DHCP para rede interna - TCP-rede interna
iptables -A INPUT -i $VPNIF --dst $IP_INTERNO -j ACCEPT # Trafego entrada VPN IPSEC
iptables -A INPUT -i $VPNIF --dst $INTBC -j ACCEPT # Broadcast VPN IPSEC para rede interna
#iptables -A INPUT -i $VPNIF --dst $INTBC -j ACCEPT; fi # Broadcast VPN IPSEC para rede interna
#iptables -A INPUT -i $PPPXIF --dst $INTIP -j ACCEPT; fi # Trafego entrada VPN PPTP
#iptables -A INPUT -i $PPPXIF --dst $INTBC -j ACCEPT; fi # Broadcast VPN PPTP para rede interna
iptables -A INPUT -i $IF_EXTERNO --dst $IP_EXTERNO -p esp -j ACCEPT # Entrada protocolo VPN IPSEC - esp
iptables -A INPUT -i $IF_EXTERNO --dst $IP_EXTERNO -p ah -j ACCEPT # Entrada protocolo VPN IPSEC - ah
iptables -A INPUT -i $IF_EXTERNO --dst $IP_INTERNO/255.255.255.255 -p gre -j ACCEPT # Entrada protocolo VPN PPTP - pptp
iptables -A INPUT -m state --state ESTABLISHED,RELATED -i $IF_EXTERNO --dst $IP_EXTERNO -j ACCEPT # Trafego externo para o servidor
iptables -A INPUT -m state --state ESTABLISHED,RELATED --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -j ACCEPT # Trafego interno para o servidor
#iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO -p icmp --icmp-type destination-unreachable -j ACCEPT; fi # ICMP destination-unreachable
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type source-quench -j ACCEPT; fi # ICMP source-quench
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type time-exceeded -j ACCEPT; fi # ICMP time-exceeded
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type parameter-problem -j ACCEPT; fi # ICMP parameter-problem
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type echo-request -j ACCEPT; fi # ICMP echo-request
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type echo-reply -j ACCEPT; fi # ICMP echo-reply
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type destination-unreachable -j ACCEPT; fi # ICMP destination-unreachable
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type source-quench -j ACCEPT; fi # ICMP source-quench
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type time-exceeded -j ACCEPT; fi # ICMP time-exceeded
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type parameter-problem -j ACCEPT; fi # ICMP parameter-problem
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type echo-request -j ACCEPT; fi # ICMP echo-request
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type echo-request -j ACCEPT; fi # ICMP echo-request
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type echo-reply -j ACCEPT; fi # ICMP echo-reply
iptables -A FORWARD -i $VPNIF -j ACCEPT # Permissao de entrada da VPN IPSEC
iptables -A FORWARD -o $VPNIF -j ACCEPT # Permissao de saida para VPN IPSEC
iptables -A FORWARD -i $PPPXIF -j ACCEPT # Permissao de entrada da VPN PPTP
iptables -A FORWARD -o $PPPXIF -j ACCEPT # Permissao de saida para VPN PPTP
iptables -t nat -A PREROUTING -i $IF_INTERNO -p tpc --dport 80 -j REDIRECT --to-port 3128 #redirecionar www da porta 80 para 3128 proxy
iptables -A INPUT -i $IF_INTERNO --dst $IP_INTERNO/255.255.255.255 -p tcp --dport 3128 -j ACCEPT # acesso interno ao Proxy
#iptables -A POSTROUTING --src $IP_INTERNO/$INTMASK -o $EXTIF -j MASQUERADE -t nat # Mascarar trafego de rede interna para ip externo
iptables -A INPUT --dst $IP_EXTERNO -p tcp --dport 22 -j ACCEPT; #Acesso externo ao ssh
iptables -A INPUT --dst $IP_INTERNO -p tcp --dport 22 -j ACCEPT; #Acesso interno ao ssh
#iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_EXTERNO -j ACCEPT # Servidor web
###################### PROTECA CONTRA WORMS ################################################## #########
iptables -A FORWARD -p tcp --dport 135 -i $IF_INTERNO -j REJECT
###################### PROTECAO CONTRA Syn-flood ################################################## ####
iptables -A FORWARD -p tcp --syn -m limit --limit 2/s -j ACCEPT
################### PROTECAO CONTRA PING DA MORTE ################################################## ###
iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
######################################### LIBERANDO E BLOQUEANDO PORTAS #################
iptables -A INPUT --dst $IP_INTERNO/255.255.255.255 -p tcp --dport 137:139 -j ACCEPT # Servidor de arquivos mascara
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $INTBC -p tcp --dport 137:139 -j ACCEPT # Servidor de arquivos broadcast TPC
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -p udp --dport 137:139 -j ACCEPT # Servidor de arquivos ip interno
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $INTBC -p udp --dport 137:139 -j ACCEPT # Servidor de arquivos broadcast UDP
iptables -A INPUT --dst $IP_EXTERNO -p tcp --dport 1723 -j ACCEPT # VPN - PPTP
iptables -A INPUT -i $IF_INTERNO --dst $IP_INTERNO/255.255.255.255 -p tcp --dport 110 -j ACCEPT # E-mail - POP3
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -p tcp --dport 995 -j ACCEPT # E-mail - POP3S
iptables -A INPUT --dst $IP_EXTERNO/255.255.255.255 -p tcp --dport 25 -j ACCEPT # E-mail - SMTP
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -p tcp --dport 25 -j ACCEPT #E-mail - SMTP
iptables -A INPUT --dst $IP_EXTERNO -p tcp --dport 500 -j ACCEPT # VPN - IPSEC tcp
iptables -A INPUT --dst $Ip_EXTERNO -p udp --dport 500 -j ACCEPT # VPN - IPSEC udp
iptables -A INPUT -i $INTIF -p tcp --sport 53 -j ACCEPT #liberando DNS TCP
iptables -A INPUT -i $INTIF -p udp --sport 53 -j ACCEPT #Liberando DNS UDP
iptables -A PREROUTING -p tcp --dport 3389 -j DNAT -t nat --to-destination 10.0.1.80-10.0.1.80:3389 # redirecionar porta terminal services
iptables -A FORWARD -i $IF_EXTERNO --dst 10.0.1.80/255.255.255.255 -p tcp --dport 3389 -j ACCEPT # habilitar trafego ts
iptables -A FORWARD -i $IF_INTERNO -o $IF_EXTERNO -j ACCEPT # Permissao de acesso a rede externa
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -i $IF_EXTERNO -o $IF_INTERNO -j ACCEPT # Permissao de acesso a rede interna
Dell Xps M1330/c2d 2.0Ghz/4GB ddr2/320GB sata/etc...

Akuhn

Olá colega, pelo que vi você mexeu nas variáveis do script, vai ter que mudar no script todo.
Olhei rapidamente o script e encontrei algumas linhas com variáveis inexistentes, marquei elas em negrito para que você possa achá-las e corrigi-las.

PS: Devem ter mais linhas com problemas, preste bem atenção nas linhas que contém as variáveis que você mexeu.

[ ]'s.

Citar############################### VARIAVEIS ######################################
IF_INTERNO="eth1"
IF_EXTERNO="eth0"
VPNIF="ipsec0"
PPPXIF="ppp+"
DMZIF="eth2"
IP_INTERNO="192.168.1.1"
IP_EXTERNO="10.0.1.26"
INTMASK="255.255.255.255"
####################### BLOQUEIA TUDO ENQUANTO SETA AS REGRAS ###############
#iptables -A INPUT -i ! lo -j DROP
#iptables -A OUTPUT -o ! lo -j DROP
######################## COMPARTILHA A INTERNET ##############################
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -j DROP
iptables -t nat -A POSTROUTING -o $IF_EXTERNO -j MASQUERADE
###################### JOGA CADA UMA PARA SEU CHAIN CHAIN ###################
iptables -A INPUT -i lo -j ACCEPT
######################### LEVANTA MODULOS ###################################
modprobe ip_nat_ftp
modprobe ip_conntrack_ftp
modprobe ip_tables
modprobe iptable_filter
modprobe ip_conntrack
modprobe iptable_nat
modprobe ipt_LOG
modprobe ipt_state
modprobe ipt_REJECT
modprobe ipt_MASQUERADE
######################## LIMPA REGRAS ########################################
iptables -F
iptables -Z
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
############################# POLITICAS ####################################
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
##################### BLOQUEIA SPOOFING ####################################
echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
##################NAO RESPONDER A PINGS###################################
#echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
####################LIBERARANDO INPUT LOOPBACK###########################
iptables -A INPUT -p ALL -s 127.0.0.1 -i lo -j ACCEPT
iptables -A INPUT -p ALL -s $IF_GW -i lo -j ACCEPT
######################## REGRAS ############################################
iptables -A INPUT -i $IF_INTERNO --dst 255.255.255.255 -p tcp --dport 67:68 -j ACCEPT # DHCP para rede interna - TCP-netmask
iptables -A INPUT -i $IF_INTERNO --dst 255.255.255.255 -p udp --dport 67:68 -j ACCEPT # DHCP para rede interna - UDP-netmask
iptables -A INPUT -i $IF_INTERNO --dst $IPINT -p tcp --dport 67:68 -j ACCEPT # DHCP para rede interna - TCP-rede interna
iptables -A INPUT -i $IF_INTERNO --dst $IPEXT -p tcp --dport 67:68 -j ACCEPT # DHCP para rede interna - TCP-rede interna
iptables -A INPUT -i $VPNIF --dst $IP_INTERNO -j ACCEPT # Trafego entrada VPN IPSEC
iptables -A INPUT -i $VPNIF --dst $INTBC -j ACCEPT # Broadcast VPN IPSEC para rede interna
#iptables -A INPUT -i $VPNIF --dst $INTBC -j ACCEPT; fi # Broadcast VPN IPSEC para rede interna
#iptables -A INPUT -i $PPPXIF --dst $INTIP -j ACCEPT; fi # Trafego entrada VPN PPTP
#iptables -A INPUT -i $PPPXIF --dst $INTBC -j ACCEPT; fi # Broadcast VPN PPTP para rede interna
iptables -A INPUT -i $IF_EXTERNO --dst $IP_EXTERNO -p esp -j ACCEPT # Entrada protocolo VPN IPSEC - esp
iptables -A INPUT -i $IF_EXTERNO --dst $IP_EXTERNO -p ah -j ACCEPT # Entrada protocolo VPN IPSEC - ah
iptables -A INPUT -i $IF_EXTERNO --dst $IP_INTERNO/255.255.255.255 -p gre -j ACCEPT # Entrada protocolo VPN PPTP - pptp
iptables -A INPUT -m state --state ESTABLISHED,RELATED -i $IF_EXTERNO --dst $IP_EXTERNO -j ACCEPT # Trafego externo para o servidor
iptables -A INPUT -m state --state ESTABLISHED,RELATED --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -j ACCEPT # Trafego interno para o servidor
#iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO -p icmp --icmp-type destination-unreachable -j ACCEPT; fi # ICMP destination-unreachable
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type source-quench -j ACCEPT; fi # ICMP source-quench
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type time-exceeded -j ACCEPT; fi # ICMP time-exceeded
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type parameter-problem -j ACCEPT; fi # ICMP parameter-problem
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type echo-request -j ACCEPT; fi # ICMP echo-request
#$IPT -A INPUT --src $INTIP/$INTMASK -i $INTIF -p icmp --icmp-type echo-reply -j ACCEPT; fi # ICMP echo-reply
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type destination-unreachable -j ACCEPT; fi # ICMP destination-unreachable
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type source-quench -j ACCEPT; fi # ICMP source-quench
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type time-exceeded -j ACCEPT; fi # ICMP time-exceeded
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type parameter-problem -j ACCEPT; fi # ICMP parameter-problem
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type echo-request -j ACCEPT; fi # ICMP echo-request
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type echo-request -j ACCEPT; fi # ICMP echo-request
#$IPT -A INPUT -i $EXTIF --dst $EXTIP -p icmp --icmp-type echo-reply -j ACCEPT; fi # ICMP echo-reply
iptables -A FORWARD -i $VPNIF -j ACCEPT # Permissao de entrada da VPN IPSEC
iptables -A FORWARD -o $VPNIF -j ACCEPT # Permissao de saida para VPN IPSEC
iptables -A FORWARD -i $PPPXIF -j ACCEPT # Permissao de entrada da VPN PPTP
iptables -A FORWARD -o $PPPXIF -j ACCEPT # Permissao de saida para VPN PPTP
iptables -t nat -A PREROUTING -i $IF_INTERNO -p tpc --dport 80 -j REDIRECT --to-port 3128 #redirecionar www da porta 80 para 3128 proxy
iptables -A INPUT -i $IF_INTERNO --dst $IP_INTERNO/255.255.255.255 -p tcp --dport 3128 -j ACCEPT # acesso interno ao Proxy
#iptables -A POSTROUTING --src $IP_INTERNO/$INTMASK -o $EXTIF -j MASQUERADE -t nat # Mascarar trafego de rede interna para ip externo
iptables -A INPUT --dst $IP_EXTERNO -p tcp --dport 22 -j ACCEPT; #Acesso externo ao ssh
iptables -A INPUT --dst $IP_INTERNO -p tcp --dport 22 -j ACCEPT; #Acesso interno ao ssh
#iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_EXTERNO -j ACCEPT # Servidor web
###################### PROTECA CONTRA WORMS ################################################## #########
iptables -A FORWARD -p tcp --dport 135 -i $IF_INTERNO -j REJECT
###################### PROTECAO CONTRA Syn-flood ################################################## ####
iptables -A FORWARD -p tcp --syn -m limit --limit 2/s -j ACCEPT
################### PROTECAO CONTRA PING DA MORTE ################################################## ###
iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
######################################### LIBERANDO E BLOQUEANDO PORTAS #################
iptables -A INPUT --dst $IP_INTERNO/255.255.255.255 -p tcp --dport 137:139 -j ACCEPT # Servidor de arquivos mascara
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $INTBC -p tcp --dport 137:139 -j ACCEPT # Servidor de arquivos broadcast TPC
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -p udp --dport 137:139 -j ACCEPT # Servidor de arquivos ip interno
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $INTBC -p udp --dport 137:139 -j ACCEPT # Servidor de arquivos broadcast UDP
iptables -A INPUT --dst $IP_EXTERNO -p tcp --dport 1723 -j ACCEPT # VPN - PPTP
iptables -A INPUT -i $IF_INTERNO --dst $IP_INTERNO/255.255.255.255 -p tcp --dport 110 -j ACCEPT # E-mail - POP3
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -p tcp --dport 995 -j ACCEPT # E-mail - POP3S
iptables -A INPUT --dst $IP_EXTERNO/255.255.255.255 -p tcp --dport 25 -j ACCEPT # E-mail - SMTP
iptables -A INPUT --src $IP_INTERNO/$INTMASK -i $IF_INTERNO --dst $IP_INTERNO -p tcp --dport 25 -j ACCEPT #E-mail - SMTP
iptables -A INPUT --dst $IP_EXTERNO -p tcp --dport 500 -j ACCEPT # VPN - IPSEC tcp
iptables -A INPUT --dst $Ip_EXTERNO -p udp --dport 500 -j ACCEPT # VPN - IPSEC udp
iptables -A INPUT -i $INTIF -p tcp --sport 53 -j ACCEPT #liberando DNS TCP
iptables -A INPUT -i $INTIF -p udp --sport 53 -j ACCEPT #Liberando DNS UDP
iptables -A PREROUTING -p tcp --dport 3389 -j DNAT -t nat --to-destination 10.0.1.80-10.0.1.80:3389 # redirecionar porta terminal services
iptables -A FORWARD -i $IF_EXTERNO --dst 10.0.1.80/255.255.255.255 -p tcp --dport 3389 -j ACCEPT # habilitar trafego ts
iptables -A FORWARD -i $IF_INTERNO -o $IF_EXTERNO -j ACCEPT # Permissao de acesso a rede externa
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -i $IF_EXTERNO -o $IF_INTERNO -j ACCEPT # Permissao de acesso a rede interna
Aldefax Gilvan Kuhn

Linux User 410689

lfernandosg

Muito obrigado estava olhando isso agora mas agora pintou outro problema....peguei o mesmo script e coloquei em um ddesktop com debian pra ir testando mas agora apresenta esse erro:

root@linux:/home/fernando# chmod +x /etc/init.d/firewall
root@linux:/home/fernando#  /etc/init.d/firewall start
bash: /etc/init.d/firewall: /bin/bash^M: interpretador inválido: Arquivo ou diretório inexistente
 
o que será?

outra dúvida se puder me ajudar...minha rede da empresa interna tem máscara 255.255.255.0, queria saber porque no servidor atual a interface e ip interno tem mascara 255.255.255.255? e porque nesse scrip eles utilizam o 255.255.255.255 e avariável INTMASK que não foi definida por eles?


desde já gardeço pela ajuda!
Dell Xps M1330/c2d 2.0Ghz/4GB ddr2/320GB sata/etc...