Results 1 to 2 of 2
Ok, this is maybe an odd one. I have a system with a single nic and ip address a.b.c.1 (system A) I want to proxy incoming requests to port 80 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-09-2007 #1
- Join Date
- Feb 2007
iptables proxy with a single interface
Ok, this is maybe an odd one.
I have a system with a single nic and ip address a.b.c.1 (system A)
I want to proxy incoming requests to port 80 to a different system on a different subnet of x.y.z.1 (system B)
On system a.b.c.1, I am trying the following in my /etc/sysconfig/iptables:
-A PREROUTING -p tcp --dport 80 -j DNAT --to x.y.z:80
This seems to ALMOST work. The request from a client system (System C) go to System A, get rewritten and are received by system B. System B seems to be responding, trying to send to System C directly, but (I think) System C is expecting its response to be from system A, not System B, so it ignores the responses. At least, I see that kind of traffic with tcpdump on each system.
Any help/ideas here? Perhaps there is a different approach other than iptables too. FWIW, I want System A to be able to proxy http, dns and ftp to System B on a different network.
- 02-09-2007 #2
That should work. Can you ping system B from client C? I expect there is a routing problem to get from C to B and vice versa."Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds