All of lore.kernel.org
 help / color / mirror / Atom feed
* Matching packets by HTTP header "Host"
@ 2007-03-13 10:47 Giovanni Lovato
  2007-03-13 11:15 ` Joris Dobbelsteen
  2007-03-13 18:38 ` Pascal Hambourg
  0 siblings, 2 replies; 4+ messages in thread
From: Giovanni Lovato @ 2007-03-13 10:47 UTC (permalink / raw)
  To: netfilter

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all.
I'm trying to forward packets to different hosts depending on the "Host"
header in HTTP packets, e.g. packets on port 80 requesting "Host:
one.example.org" to 192.168.0.1 and all other on port 80 to 192.128.0.2.
I did:

iptables -t nat -A PREROUTING -p TCP -i eth0 -m string --algo bm
- --string "Host: one.example.org" --destination-port 80 -j DNAT
- --to-destination 192.168.0.1

iptables -t nat -A PREROUTING -p TCP -i eth0 --destination-port 80 -j
DNAT --to-destination 192.168.0.2

But all packets are going to 192.168.0.2. Do I miss something?

Regards,
G.L.
- --
www.aldu.net/~heruan
giovanni.lovato@aldu.net
ldaps://pgpkeys.aldu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF9oFZaWLXrn9dopwRAjfbAKCAyWaZ5h/1w9Bvaj5aOhmsj0GIgACfXbbM
l3+Z0tatK47gMv7iMANg6u4=
=LAJU
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-13 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-13 10:47 Matching packets by HTTP header "Host" Giovanni Lovato
2007-03-13 11:15 ` Joris Dobbelsteen
2007-03-13 18:38 ` Pascal Hambourg
2007-03-13 18:50   ` Giovanni Lovato

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.