iptables -> DNAT & SNAT

This is a discussion on iptables -> DNAT & SNAT within the Linux Security forums, part of the System Security and Security Related category; hello i want to redirect everything going to the internet to be redirected transparently to squid sitting on 10.0....


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-02-2003
Adrian Immler
 
Posts: n/a
Default iptables -> DNAT & SNAT

hello

i want to redirect everything going to the internet to be redirected
transparently to squid sitting on 10.0.0.10:3128. 10.0.210.200 is my
firewall. both are in the same subnet (255.255.0.0). Now i have setup the
following rules:

Chain PREROUTING (policy ACCEPT 143 packets, 27617 bytes)
pkts bytes target prot opt in out source destination
17 1020 DNAT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcp dpt:80 to:10.0.0.10:3128
0 0 DNAT udp -- * * 0.0.0.0/0 !127.0.0.1 udp dpt:80 to:10.0.0.10:3128

Chain POSTROUTING (policy ACCEPT 2 packets, 138 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT tcp -- * * 0.0.0.0/0 10.0.0.10 tcp dpt:3128 to:10.0.210.200
0 0 SNAT udp -- * * 0.0.0.0/0 10.0.0.10 udp dpt:3128 to:10.0.210.200

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


i know that i have will have problems with routing the proxy back through
the firewall, but i will ignore that for now. what makes me a real
headache is that in the POSTROUTING chain no rule matches the packets to
SNAT the addresses. does anyone have any clue/tip/hint/idea !?

thanks in advance !
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0