Sampling Is Simple

Thursday, November 16, 2006
PREROUTING chain of the nat table

The PREROUTING chain is pretty much what it says, it does network address translation on packets before they actually hit the routing decision that sends them onward to the INPUT or FORWARD chains in the filter table. The only reason that we talk about this chain in this script is that we once again feel obliged to point out that you should not do any filtering in it. The PREROUTING chain is only traversed by the first packet in a stream, which means that all subsequent packets will go totally unchecked in this chain. As it is with this script, we do not use the PREROUTING chain at all, however, this is the place we would be working in right now if we wanted to do DNAT on any specific packets, for example if you want to host your web server within your local network. For more information about the PREROUTING chain, read the Traversing of tables and chains chapter.


example : iptables -I PREROUTING -d 206.90.31.2/32 -j DNAT --to-destination 10.100.999.18 -t nat

Caution

The PREROUTING chain should not be used for any filtering since, among other things, this chain is only traversed by the first packet in a stream. The PREROUTING chain should be used for network address translation only, unless you really know what you are doing.



posted by realme @ 5:21 PM  
0 Comments:
Post a Comment
<< Home
 
Writing is Difficult things but Copy Paste is Easy one, so what do want to choose?? Up to You...
About Me

Name: realme
Home:
About Me:
See my complete profile
Previous Post
Archives
The Note

Life like A Bird, free for flaying around the word.

Links
Powered by

Free Blogger Templates

BLOGGER