On Wed, 2002-12-11 at 17:06, Patrick Maartense wrote: > this is not possible using ipotables > Ummm, what is the -s parameter for then? iptables -t nat -A PREROUTING -p tcp -s <hostname A> --dport 80 -j REDIRECT --to-destination 192.168.1.1:80 iptables -t nat -A PREROUTING -p tcp -s <hostname B> --dport 80 -j REDIRECT --to-destination 192.168.1.2:80 Or am I missing something? Ray > Apache however can very well handle this .. > > > On Wed, 11 Dec 2002, bernard wrote: > > > I'm using iptables to redirect external requests depending on their > > port/protocol like this : > > > > hostname A:80 -> public ip -> iptables -> 192.168.1.1:80 > > hostname B:80 -> public ip -> iptables -> 192.168.1.1:80 > > > > It works pretty well, thanks to iptables :-) > > > > Now I want to redirect on a hostname basis on different private ip's > > like this : > > > > hostname A:80 -> public ip -> iptables -> 192.168.1.1:80 > > hostname B:80 -> public ip -> iptables -> 192.168.1.2:80 > > > > Does anyone know a solution ? > > > > Thanks for your help. > > > > Bernard > > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ( Raymond Leach ) ) Knowledge Factory ( ( ) ) Tel: +27 11 445 8100 ( ( Fax: +27 11 445 8101 ) ) ( ( http://www.knowledgefactory.co.za/ ) ) http://www.saptg.co.za/ ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ o o o o .--. .--. | o_o| |o_o | | \_:| |:_/ | / / \\ // \ \ ( | |) (| | ) /`\_ _/'\ /'\_ _/`\ \___)=(___/ \___)=(___/
Attachment:
signature.asc
Description: This is a digitally signed message part