can nat work in vlan

Robert Moskowitz rgm at htt-consult.com
Thu Feb 26 19:04:39 UTC 2009


ann kok wrote:
> Hi
>
> I want to configure 802.1q 3 vlans
>
> eg:
>
> 192.168.1.0/24 vlan2
>
> 192.168.2.0/24 vlan3 ....
>
> can nat work in those vlan?
>   

NAT is layer 3 games. Vlan is layer 2. Once layer 2 has handed the 
packet up the stack, layer 3 can do anything it wants with its content. 
I do things like this all the time.

> how does it map?
>
> ls it
>
> iptables --append FORWARD --in-interface eth1.2 -j ACCEPT 
>
> iptables --append FORWARD --in-interface eth1.3 -j ACCEPT 

Well this I can't tell you as I use tools like Shorewall to do the NATing.





More information about the fedora-list mailing list