Postado originalmente por
mr.gam
pessoal, fico muito grato pela grande ajuda q estao me dando,
pesso q naum me levem a mal mas resolvi passar o fire pra vc´s vere, como esta, blz!
Realmente estou precisando urgente deste procedimento pois j´s engrossei e naum acho a saida.
entao tá aí.
# Generated by iptables-save v1.2.9 on Mon Dec 15 20:50:37 2003
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
# DNS Server PRE
-A PREROUTING -d 10.30.1.1 -j DNAT --to-destination 10.30.2.1
# DNAT Valido
-A PREROUTING -d 200.?.?.? -j DNAT --to-destination 192.168.0.2
# Redirect Squid
-A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128
# Masq IP
-A POSTROUTING -o eth1 -j MASQUERADE
# DNS Server POST
-A POSTROUTING -s 10.30.2.1 -j SNAT --to-source 10.30.1.1
# SNAT Valido
-A POSTROUTING -s 192.168.0.2 -j SNAT --to-source 200.?.?.?
COMMIT
# Completed on Mon Dec 15 20:50:37 2003
# Generated by iptables-save v1.2.9 on Mon Dec 15 20:50:37 2003
*mangle
:PREROUTING ACCEPT [9:1243]
:INPUT ACCEPT [9:1243]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [10:3755]
:POSTROUTING ACCEPT [10:3755]
COMMIT
# Completed on Mon Dec 15 20:50:37 2003
# Generated by iptables-save v1.2.9 on Mon Dec 15 20:50:37 2003
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:Block - [0:0]
:Users - [0:0]
:OUTPUT ACCEPT [0:0]
#-A FORWARD -o eth1 -j LOG --log-level 7 --log-prefix BANDWIDTH_OUT:
#-A FORWARD -i eth1 -j LOG --log-level 7 --log-prefix BANDWIDTH_IN:
#-A OUTPUT -o eth1 -j LOG --log-level 7 --log-prefix BANDWIDTH_OUT:
#-A INPUT -i eth1 -j LOG --log-level 7 --log-prefix BANDWIDTH_IN:
# Http
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# SSH
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -d 200.?.?.? -j ACCEPT
-A INPUT -i lo -j ACCEPT
# -A INPUT -i wlan0 -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j Users
-A INPUT -j Block
-A FORWARD -j Block
-A Block -m state -i eth1 --state NEW -j DROP
# Aceita conexões ja estabelecidas
-A Block -m state --state ESTABLISHED,RELATED -j ACCEPT
# FTP / SSH / Telnet / SMTP
-A Block -p tcp -m tcp --dport 20:25 -j ACCEPT
-A Block -p udp -m udp --dport 20:25 -j ACCEPT
# DNS
-A Block -p tcp -m tcp --dport 53 -j ACCEPT
-A Block -p udp -m udp --dport 53 -j ACCEPT
# http
-A Block -p tcp -m tcp --dport 80 -j ACCEPT
-A Block -p udp -m udp --dport 80 -j ACCEPT
# Pop-3
-A Block -p tcp -m tcp --dport 110 -j ACCEPT
-A Block -p udp -m udp --dport 110 -j ACCEPT
# https
-A Block -p tcp -m tcp --dport 443 -j ACCEPT
-A Block -p udp -m udp --dport 443 -j ACCEPT
# Sistema da Saude
-A Block -p tcp -m tcp --dport 211 -j ACCEPT
-A Block -p udp -m udp --dport 211 -j ACCEPT
# Proxy
-A Block -p tcp -m tcp --dport 3128 -j ACCEPT
-A Block -p udp -m udp --dport 3128 -j ACCEPT
# Altas Geral
-A Block -p tcp -m tcp --dport 1024:65535 -j ACCEPT
-A Block -p udp -m udp --dport 1024:65535 -j ACCEPT
# MICRO1
-A Users -m mac -s 192.168.0.2 -j RETURN --mac 00:02:78:e3:37:d7
# MICRO2
-A Users -m mac -s 192.168.0.3 -j RETURN --mac 00:40:f4:ab:1a:e2
tenho na eth1:1 200.?.?.? ativa
tenho na eth0:1 192.168.0.2
fico muito grato pela força.
[email protected]