* rewriting destination port of outbound packets
@ 2005-03-10 19:20 Mason Schmitt
2005-03-11 11:36 ` Jason Opperisano
0 siblings, 1 reply; 2+ messages in thread
From: Mason Schmitt @ 2005-03-10 19:20 UTC (permalink / raw)
To: netfilter
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I am attempting to configure a Linux box (mandrake 10.1 - iptables
1.2.9) to redirect http, ftp, real, winmedia, quicktime, and nntp to a
Netapp NetCache transparent caching proxy.
Here is my network layout:
~ Net
~ |
~ Linux router/fw
~ |
- ------switch-------
| |
clients cache
Starting first with http, I have made use of fwmark and iproute2 to
first mark traffic from our network to destination port 80 and then
route that traffic, out the same interface it came in on, to the web
cache. The problem I am trying to resolve is that the traffic that I am
routing to the cache still has the destination port 80. I think this
needs to be 3128 (The cache accepts connections on port 3128).
So, is it possible to rewrite the destination port in this scenario?
- --
Mason Schmitt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCMJ3qbip6upg8pq8RAomJAKCVqlt6m45/Ib/mBX5SSTH/7aqVegCgj8Y1
4bV9hrjcqvqXxRv3jA2Vqt4=
=uNK8
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: rewriting destination port of outbound packets
2005-03-10 19:20 rewriting destination port of outbound packets Mason Schmitt
@ 2005-03-11 11:36 ` Jason Opperisano
0 siblings, 0 replies; 2+ messages in thread
From: Jason Opperisano @ 2005-03-11 11:36 UTC (permalink / raw)
To: netfilter
On Thu, 2005-03-10 at 14:20, Mason Schmitt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am attempting to configure a Linux box (mandrake 10.1 - iptables
> 1.2.9) to redirect http, ftp, real, winmedia, quicktime, and nntp to a
> Netapp NetCache transparent caching proxy.
>
> Here is my network layout:
>
> ~ Net
> ~ |
> ~ Linux router/fw
> ~ |
> - ------switch-------
> | |
> clients cache
>
> Starting first with http, I have made use of fwmark and iproute2 to
> first mark traffic from our network to destination port 80 and then
> route that traffic, out the same interface it came in on, to the web
> cache. The problem I am trying to resolve is that the traffic that I am
> routing to the cache still has the destination port 80. I think this
> needs to be 3128 (The cache accepts connections on port 3128).
>
> So, is it possible to rewrite the destination port in this scenario?
yeah--at some point in your packet mangling:
iptables -t nat -A PREROUTING -i $INSIDE_IF -p tcp --dport 80 \
-j DNAT --to-destination $NETCACHE_IP:3128
as an aside--your life would be infinitely easier if you added a third
NIC to the Linux router/fw and put the netcache on that segment...IMHO
-j
--
"Dear Baby, Welcome to Dumpsville. Population: You"
--The Simpsons
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-11 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10 19:20 rewriting destination port of outbound packets Mason Schmitt
2005-03-11 11:36 ` Jason Opperisano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.