Iptablesprob 1

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Prerouting

iptables-A
iptables-A
iptables-A

Usuarios:
PREROUTING p TCP -d 200.40.34.67 jDNAT to 192.168.1.0/255.255.255.128
PREROUTING p TCP -d 200.40.34.67 jDNAT to 192.168.1.128/255.255.255.128
PREROUTING p TCP -d 200.40.34.67 jDNAT to 192.168.2.0/255.255.255.128

Postrouting Usuarios:
iptables-tnat-A
iptables-tnat-A
67
iptables-tnat-A
iptables-tnat-A
.67

POSTROUTING-s 192.168.1.0/255.255.255.240-j SNAT--to200.40.34.67


POSTROUTING-s 192.168.1.128/255.255.255.240-j SNAT--to200.40.34.
POSTROUTING-s 192.168.2.0/255.255.255.240-j SNAT--to200.40.34.67
POSTROUTING-s 192.168.2.128/255.255.255.240-j SNAT--to 200.40.34

Prerouting Servicios:
iptables-A PREROUTING-p TCP -d 200.40.34.68--dport80 -j DNAT--to 192.168.3.1
iptables-A PREROUTING-p TCP -d 200.40.34.68--dport25 -j DNAT--to 192.168.3.2
iptables-A PREROUTING-p TCP -d 200.40.34.68--dport21 -j DNAT--to 192.168.3.3
Forwarding:
iptables-A
iptables-A
iptables-A
iptables-A
iptables-A
iptables-A
iptables-A
iptables-A
iptables-A

FORWARD-s 192.168.1.0-i eth1 -p tcp--dport21-j ACCEPT


FORWARD-s 192.168.1.128-i eth1 -p tcp--dport21-j ACCEPT
FORWARD-s 192.168.2.3-p tcp--dport21 -j DROP
FORWARD-s 192.168.2.0-i eth1 -p tcp--dport21 -j ACCEPT
FORWARD -s 192.168.2.128-i eth1 -p tcp dport21 -j ACCEPT
FORWARD-s 192.168.3.3-p tcp--dport21 -j DROP
FORWARD-s 192.168.3.1-ieth1 -p tcp--dport80 -j ACCEPT
FORWARD-s 192.168.3.2-ieth1 -p tcp--dport25 -j ACCEPT
FORWARD -j DROP

Postrouting Servicios:
iptables-tnat-A POSTROUTING -p TCP -s 192.168.3.1-j SNAT--to 200.40.34.68
iptables-tnat-A POSTROUTING -p TCP -s 192.168.3.2-j SNAT--to 200.40.34.68
iptables-tnat-A POSTROUTING -p TCP -s 192.168.3.3-j SNAT--to 200.40.34.68

You might also like