Liberar um intervalo de IPs no Iptables [RESOLVIDO]

1. Liberar um intervalo de IPs no Iptables [RESOLVIDO]

FABIANO DE ALMEIDA CAVALLARE
sgtfabiano

(usa Debian)

Enviado em 19/01/2013 - 11:26h

Olá!
Gostaria que alguém me ajudasse a liberar um intervalo de IPs, por exemplo:

Do IP 192.168.0.10 ao 192.168.0.20, eu gostaria de liberar acesso total.

Minha Política Padrão é:

#############################################################################
# Liberando acesso interno da rede #
#############################################################################

iptables -A INPUT -p tcp --syn -s 192.168.0.1/255.255.255.0 -j DROP &&
iptables -A OUTPUT -p tcp --syn -s 192.168.0.1/255.255.255.0 -j ACCEPT &&
iptables -A FORWARD -p tcp --syn -s 192.168.0.1/255.255.255.0 -j DROP &&


Obs: Não uso Squid

Valewww


  


2. Re: Liberar um intervalo de IPs no Iptables [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/01/2013 - 15:14h

# IPS SEM PROXY
iptables -t nat -I PREROUTING -s 192.168.0.3 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.80 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.81 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.82 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.83 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.84 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.85 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.86 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.87 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -s 192.168.0.88 -p tcp --dport 80 -j ACCEPT



3. Re: Liberar um intervalo de IPs no Iptables [RESOLVIDO]

leonardo Souza
lejoso

(usa Debian)

Enviado em 23/01/2013 - 16:12h

Tenta dessa maneira

iptables -I FORWARD -m iprange --src-range 192.168.0.10-192.168.0.20 -j ACCEPT
iptables -I FORWARD -m iprange --dst-range 192.168.0.10-192.168.0.20 -j ACCEPT
iptables -t nat -I POSTROUTING -m iprange --src-range 192.168.0.10-192.168.0.20 -j MASQUERADE

Att,

Lejoso


4. Resolvido

FABIANO DE ALMEIDA CAVALLARE
sgtfabiano

(usa Debian)

Enviado em 23/01/2013 - 21:54h

Valewww rapaziada

A dica do lejoso, funcionou!!!






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts