LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-04-2009, 06:54 AM   #1
advaitraut
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Rep: Reputation: 0
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
 
Old 09-04-2009, 06:59 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
You can do that in iptables. Squid is just http proxy. It will always resolve using dns.
 
Old 09-06-2009, 09:32 AM   #3
advaitraut
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Original Poster
Rep: Reputation: 0
particular site redireaction .

Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
 
Old 09-06-2009, 08:06 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
Try this http://www.debuntu.org/how-to-redire...using-iptables
 
Old 09-07-2009, 12:32 AM   #5
advaitraut
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get destination address of UDP packet? andreyk Programming 7 08-01-2013 09:41 AM
VPN and destination unreachable / new install mandriva. All other address fine. MikeOfAustin Linux - Networking 1 04-06-2007 07:28 PM
Iptables / routing to destination address through interface Xeta Linux - Networking 7 05-10-2006 03:17 PM
userspace program for forwarding packets after amendment of the destination address becky_starr Linux - Software 0 01-12-2004 06:22 AM
problem to print source address and destination address jooboo Programming 2 11-26-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration