LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-09-2009, 10:14 AM   #1
globemast
LQ Newbie
 
Registered: Jun 2006
Distribution: Ubuntu 7.10
Posts: 15

Rep: Reputation: 0
Redirecting all traffic through HTTP proxy using iptables


Hi all,

I would like to redirect all traffic to a known HTTP proxy my ISP owns and which i have access to it.

Is this possible via IPTABLES?

If yes, could you give me a hint on the rules?

Thanks in advance.
 
Old 11-17-2011, 01:11 AM   #2
anandnenwani
Member
 
Registered: Oct 2011
Location: India,
Distribution: RHEL,Open SuSE
Posts: 39

Rep: Reputation: Disabled
Exclamation

What actually you want to do ..??

and what is your network map...??
 
Old 11-17-2011, 04:49 PM   #3
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
No, you can only redirect HTTP traffic via HTTP proxy, Iptables will not add the CONNECT line that is required forward non-HTTP traffic, and can not redirect IPv6 traffic.

Something like this should work:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-destination proxy.example.com
 
  


Reply

Tags
http, iptables, proxy, redirect


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
Traffic shaping (limiting outgoing bandwidth of all TCP-traffic except FTP/HTTP) ffkodd Linux - Networking 3 10-25-2008 12:09 AM
OpenVPN: not redirecting http traffic jp-lack Linux - Networking 2 10-22-2008 05:55 PM
dout in iptable redirecting http traffic? Santoshkb Linux - Networking 7 09-17-2007 01:28 PM
Iptables - Redirecting Outgoing Traffic Frankablu Linux - Networking 1 06-12-2005 01:18 PM
how to find http traffic and mail traffic alone? basbosco Linux - General 1 06-07-2005 10:29 PM


All times are GMT -5. The time now is 01:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration