Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-08-2008, 02:20 AM   #1
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
Red face Redirect port 80 to 8080 for One NIC(eth0)

Dear Friends ,

I know that, in the case of transparent proxy (to redirect "80" port to "8080") iptables has a rule and that is :

"/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to -port 8080 "
my server contains two NIC ('eth0' & 'eth1') and in the above rule lan card use as 'eth1' .

But If I have a One Lan Card(eth0), then can I redirect port 80 to 8080 ?

I am trying it using follwoing command , but cannot success .

"/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to -port 8080"

Can u plz tell me where is the problem and How can I redirect port '80' to '8080' if my server has a one NIC (eth0) .

Waiting for ur reply .. ..
Old 01-09-2008, 10:49 AM   #2
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,659

Rep: Reputation: Disabled
Why don't you run that HTTP server on port 8080 instead?


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
access 8080 web server port through squid running on 8080 sunethj Linux - Networking 11 05-18-2007 02:38 AM
debian iptables squid - redirect port 80 to port 8080 on another machine nickleus Linux - Networking 1 08-17-2006 12:59 AM
Port 80-->8080?? flamesrock Linux - Software 4 08-01-2004 01:40 AM
REDIRECT port 80 to 8080 not working dwynter Linux - Networking 2 06-25-2003 08:06 AM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 12:16 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:49 PM.

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
Open Source Consulting | Domain Registration