Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-09-2009, 11:14 AM   #1
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, 02:11 AM   #2
Registered: Oct 2011
Location: India,
Distribution: RHEL,Open SuSE
Posts: 39

Rep: Reputation: Disabled

What actually you want to do ..??

and what is your network map...??
Old 11-17-2011, 05:49 PM   #3
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


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 01:09 AM
OpenVPN: not redirecting http traffic jp-lack Linux - Networking 2 10-22-2008 06:55 PM
dout in iptable redirecting http traffic? Santoshkb Linux - Networking 7 09-17-2007 02:28 PM
Iptables - Redirecting Outgoing Traffic Frankablu Linux - Networking 1 06-12-2005 02:18 PM
how to find http traffic and mail traffic alone? basbosco Linux - General 1 06-07-2005 11:29 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:59 AM.

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