Ajude me a liberar dhcp neste script de iptables

1. Ajude me a liberar dhcp neste script de iptables

Nuevo-debian
Nuevo-debian

(usa Debian)

Enviado em 12/08/2011 - 16:01h

pessoal, estou tendo problemas para liberar o DHCP para rede interna, as redes atribuidas para o servidor estao recebendo os ips, ip do servidor 192.168.1.xx, ips das redes criadas no servidor 10.1.0.xx, 10.2.0.xx, queria que atribuise ips para rede que o servidor esta recebendo o sinal a rede 192.168.1.xx,
desde já agradeço.

segue o script para analise.

****************************************************************

#!/bin/bash

iptables -t nat -F
iptables -F

### Politica
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

### Portas
TCPPORTS="22 53 67 68 137 138 139"
UDPPORTS="53 67 68 137 138 139"

### Laco para liberacao de portas
for TCPPORTS in $TCPPORTS; do
iptables -A FORWARD -p tcp --dport $TCPPORTS -j ACCEPT
iptables -A FORWARD -p tcp --dport $TCPPORTS -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport $TCPPORTS -j ACCEPT
done

for UDPPORTS in $UDPPORTS; do
iptables -A FORWARD -p udp --dport $UDPPORTS -j ACCEPT
iptables -A FORWARD -p udp --dport $UDPPORTS -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport $UDPPORTS -j ACCEPT
done


### liberando dep 2
IPS="10.2.0.5 10.2.0.49"

for IPS in $IPS; do
iptables -A FORWARD -s $IPS -j ACCEPT
iptables -A FORWARD -d $IPS -j ACCEPT
iptables -t nat -A PREROUTING -s $IPS -j ACCEPT
done
####################################################################

## acesso entre vlans
iptables -A FORWARD -s 10.1.0.0/24 -d 10.2.0.0/24 -j DROP
iptables -A FORWARD -d 10.1.0.0/24 -s 10.2.0.0/24 -j DROP

### Liberando ping
iptables -A FORWARD -p icmp -j ACCEPT

###teste dhcp
iptables -A INPUT -i eth1 -p tcp --sport 1024:65535 --dport 67 -j ACCEPT
iptables -A OUTPUT -o eth1 -p tcp --sport 67 --dport 1024:65535 -j ACCEPT

### Redirecionando proxy transparente
iptables -t nat -A PREROUTING -s 10.0.0.0/8 -p tcp --dport 80 -j REDIRECT --to-port 3128


### Mascarando a saida
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts