masquerading with iptables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all
  After the lan story, I'm about to set up the masquerading rules with 
iptables.

  From the iptables man pages, the right table for this is the nat table, 
with first the MASQUERADE target on the POSTROUTING chain, and second the 
REDIRECT target on the PREROUTING and OUTPUT chains.

  In fact, my connection type is presumed to be either DSL or DHCP, so the 
external computer IP address is dynamic.

  I understand well the MASQUERADE target operates after the output packet 
has been routed, in order to modify the source address of the output 
packet, as if it was coming from the external IP address of the computer.

  So the source address to be set in the rule, is the real external 
address of the computer.

  Furthermore, I understand well too, the REDIRECT target could operate 
before the input packet is being routed, such that the destination address 
might be those of the internal interface ( to the machine itself 
), however I can't understand the OUTPUT chain could be a possible chain 
for this target.

  Apparently, I need some more informations for using this REDIRECT target 
together with the appropriate chain, in particular to be able to 
suitably set up the destination address for this/these rule(s).

  Another problem is the routing table problem: Is it sufficient to route 
all packets from/to the external interface ( eth0 ) to/from the internal 
one ( eth1 ) ?
 
  Thank you for your responses.
  Best regards.

  Jean Francois Ortolo






[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux