LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   perticular webiste forwarding to destination ip address. (https://www.linuxquestions.org/questions/linux-newbie-8/perticular-webiste-forwarding-to-destination-ip-address-752628/)

advaitraut 09-04-2009 06:54 AM

perticular webiste forwarding to destination ip address.
 
Hi guys,
Basically i have constructed an squid proxy server running on RHEL5.2 64 bit.everything is working fine,except that i want to redirect few sites to other intranet destination ipaddress instead of DNS.
How can i do that? is that possible through squid or i need to setup an iptables which will contain string filter and then redirect those particular sites to destination ipaddrress. if it is possible then please help me out.

Regards
Advait

linuxlover.chaitanya 09-04-2009 06:59 AM

You can do that in iptables. Squid is just http proxy. It will always resolve using dns.

advaitraut 09-06-2009 09:32 AM

particular site redireaction .
 
Quote:

Originally Posted by linuxlover.chaitanya (Post 3669504)
You can do that in iptables. Squid is just http proxy. It will always resolve using dns.

hi chaitanya,
Thanks for ur reply.. but can u show me the type of rule that i need to set in my iptables so that i can redirect those particular sites to destination ipaddress instead of DNS.

if possible please show with an example that will be a great help for me.

Regards
Advait H. Raut.

chrism01 09-06-2009 08:06 PM

Try this http://www.debuntu.org/how-to-redire...using-iptables

advaitraut 09-07-2009 12:32 AM

Quote:

Originally Posted by chrism01 (Post 3672359)

Hi Chris
Thanks for ur reply that link helped me a little. but the scenario is little different. what am trying to do is am trying to redirect only 3 websites to a particular ip address. and let other all the websites go to internet through DNS. so i need to do string filtering in iptables. i hv tried doing this but always get the following error.

iptables -t nat -A PREROUTING -p tcp --dport 8080 -m string --string "b2e.group.echonet" -j DNAT --to- 172.17.12.1:8080

error i get is :- iptables v1.3.5: STRING match: You must specify `--algo'
Try `iptables -h' or 'iptables --help' for more information.


please help,

Regards
Advait H. Raut.


All times are GMT -5. The time now is 02:27 AM.