Squid Question
Okay, so i've tried reading up information on creating a transperant proxy...but they're only talking about creating a proxy over a lan.
My case happens to be: 2 Public IP addresses. 1 address needs to route to the other when accessed. Say if i type in www.whatever.com (which happens to be x.x.x.25) That needs to be routed to another web server (x.x.x.130) Is there any way in setting this up...i'm a bit at a loss. Thanks in advance for the help. -Aaron- |
Okay, so i've tried reading up information on creating a transperant proxy...but they're only talking about creating a proxy over a lan.
They doesnt explicitly says to cater LAN; but infact its a client-set with an IP series. My case happens to be: 2 Public IP addresses. 1 address needs to route to the other when accessed. Is this fixed that the client-set will sit behind only one IP-address(ethernet interface) ? I mean; Will that be input from eth0 to output to eth1 or vice-versa or bothways ? Say if i type in www.whatever.com (which happens to be x.x.x.25) That needs to be routed to another web server (x.x.x.130) Is there any way in setting this up...i'm a bit at a loss. You can always set this by setting up tcp_outgoing_address <public-address-1(public-address-to-use-to-go-out> <client-set-maybe(0/0)> & further the main thing in your case would be routing tables (routes). And instead of conventional destination driven routing; you would be requiring source driven routing. |
amitsharma, i'm not entirely sure what you mean.
I have a web server currently set to a static ip (x.x.x.45) on eth0:1 On eth0:2 i have another ip address (x.x.x.67) When the .67 address is accessed, i need it to route traffic to ANOTHER web server (x.x.x.130) Perhaps you're right, it would be easier just setting up a routing table instead of using a proxy, but i need masking. I don't want to expose the .130 address to the world directly. |
Quote:
Code:
iptables -t nat -A PREROUTING -i eth0:2 -d x.x.x67 -j DNAT --to x.x.x.130 (only if you do not want these packets to traverse out via default route) Create a rule for this; Code:
ip ru add to x.x.x.130 table 100 Code:
ip route via <gateway-ip-of-the-interface-you-want-this-to-go-out> table 100 run Code:
#ip rou flush cache // The reason for creating the rule for this route to be processed prior to the default route(static kernel routing tables). |
You're my hero Amitsharma! Thank you.
|
All times are GMT -5. The time now is 11:47 AM. |