LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-03-2008, 06:06 AM   #1
enes1177
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Rep: Reputation: 0
redirect port 80 to 8080 by iptables but it changes again when system boot up


Hello;

I tried to redirect port 80 to 8080 by these commands:
>> /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
>> /sbin/iptables-save


It is OK, but when I reboot the machine, I see that redirection has been lost.

What do I have to do for persistent redirection? Put the commands as a cron job?

Thanks in advance
Enes Akar
 
Old 07-03-2008, 07:41 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
copy and paste the contents of iptables-save to /etc/sysconfig/iptables it should do the owrk for you.
 
Old 07-03-2008, 08:09 AM   #3
enes1177
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, the problem is fixed

Thanks, the problem is fixed
 
  


Reply



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
Iptables port forwarding is not working 8080 to 80 linux_man_2004 Linux - Networking 13 04-14-2008 01:10 PM
Redirect port 80 to 8080 for One NIC(eth0) shipon_97 Linux - Newbie 1 01-09-2008 10:49 AM
debian iptables squid - redirect port 80 to port 8080 on another machine nickleus Linux - Networking 1 08-17-2006 12:59 AM
Allowing connections to port 8080 in iptables apache363 Linux - Software 1 10-12-2004 02:14 PM
REDIRECT port 80 to 8080 not working dwynter Linux - Networking 2 06-25-2003 08:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:05 AM.

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