LinuxQuestions.org
Review your favorite Linux distribution.
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 01-08-2008, 03:20 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Rep: Reputation: 30
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, 11:49 AM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

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


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


All times are GMT -5. The time now is 04:44 PM.

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