You are not logged in.

#26 2011-02-27 08:22:52

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: NAT from ethernet to bridge, is it possible?

Whoops, my bad... Shouldn't make posts in the morning. That's correct, just delete that line wink

Offline

#27 2011-02-27 23:56:18

oTarUX
Member
From: Argentina
Registered: 2009-10-29
Posts: 33

Re: NAT from ethernet to bridge, is it possible?

I had to change "-nVL" to -"nvL", at least I could figure it out by myself.

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -A FORWARD -i br0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o br0 -m state --state ESTABLISHED,RELATED -j ACCEPT 
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth1 -j MASQUERADE
iptables -t filter -A INPUT -i eth1 -j LOG --log-prefix='[END OF INPUT] '
iptables -t filter -A OUTPUT -o eth1 -j LOG --log-prefix='[END OF OUTPUT] '
iptables -t filter -A FORWARD -j LOG --log-prefix='[END OF FORWARD] '
iptables -t nat -A POSTROUTING -o eth1 -j LOG --log-prefix='[END OF POSTROUTING out] '
iptables -t nat -nvL
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MASQUERADE  all  --  *      eth1    192.168.0.0/24       0.0.0.0/0           
    0     0 LOG        all  --  *      eth1    0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4 prefix `[END OF POSTROUTING out] ' 

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

iptables -t mangle -nvL
Chain PREROUTING (policy ACCEPT 43 packets, 3256 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT (policy ACCEPT 43 packets, 3256 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 20 packets, 2848 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 20 packets, 2848 bytes)
 pkts bytes target     prot opt in     out     source               destination

Circa mea pectora multa sunt suspiria
De tua pulchritudine, que me ledunt misere.
Tui lucent oculi sicut solis radii,
Sicut splendor fulguris, qui lucem donat tenebris.

Offline

Board footer

Powered by FluxBB