On Sat, Jul 18, 2009 at 12:29 +0200, michal krajcirovic wrote: > hello, > I have server which has several IP. there come requests for port 80 and > i want this forward requests to other server, where web is running. I > need that but completely transparent - in the logs on the destination > server where the webs must be running as well as to direct the opening > page. Then the real visitor IP, the browser, ... > > solutions via rinetd there is now is quite poor, because in logs (and > stats) are the only ip forward server. > > Any ideas on solutions? maybe some squid / apache + proxy / nginx > forward on the server?
iptables port forwarding comes to mind, use something along the lines iptables -t nat -A PREROUTING -p tcp -i ethX -d $ADDR_Y --dport 80 \ -m state --state NEW,ESTABLISHED,RELATED \ -j DNAT --to $SERV_Z for every $ADDR_Y, $SERV_Z pair, IP addresses and FQDNs are allowed iirc. If your FORWARD policy is DROP, you will have to explictly allow the forwarding you specified in the nat table. HTH Siggy ps: I'm not sure whether ubuntu-users is the right place to ask, any admin forum will have better response time :-) -- Please don't cc: me when replying on the list. bsb-at-psycho-dot-informationsanarchistik-dot-de or: bsb-at-psycho-dot-i21k-dot-de
signature.asc
Description: Digital signature