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 04-20-2011, 05:19 AM   #1
LQ Newbie
Registered: Feb 2011
Posts: 3

Rep: Reputation: 0
Exclamation Using IPTABLES to redirect web traffic to another network.

I've got a redhat box (5.2) with two NIC;s installed.

I have it connected to a network. (its a private network [I know is public but its been bought] ) this is on interface eth0

on eth1 i have the network which has a nice internet connection. Deafault gateway =

so eth0 =
and eth1 =

I want to be able to point a computer to use 128.172..101.33 (eth0) as a proxy on port 8080 or somthing.

This server will have to NAT anything coming in on port 8080 on eth0 and redirect it out of eth1 interface so it can destin itself for the internet.

I am a fairly seasoned linux user.

Never been able to grasp IP tables though.

Could someone please just post the commands so i can get this done.

I would like some feedback too on documentation and stuff but i have some but its not sufficent.

thanks in advance

Old 04-20-2011, 05:41 PM   #2
Senior Member
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,125
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
imho the easiest thing would be to set up a squid proxy on that redhat box that listens on the desired port. It'll take care of all the pain of sending it the right direction without having to do any iptables stuff (unless you want to do a transparent proxy).


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
Using Squid/Iptables to redirect inbound web traffic to url/IP winairmvs Linux - Software 2 01-13-2010 11:41 AM
iptables redirect all traffic from external ip to internal ip brb_bart Linux - Networking 1 12-17-2009 06:56 PM
Easiest way to redirect external web traffic to VMWare web host on same machine? mattp52 Linux - Networking 4 07-16-2009 02:47 PM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
redirect traffic from restricted network noir911 Linux - Networking 6 12-14-2008 07:34 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:45 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