LinuxQuestions.org
Visit Jeremy's Blog.
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 09-05-2010, 08:52 AM   #1
EgoX
LQ Newbie
 
Registered: Feb 2006
Location: Baltics
Posts: 7

Rep: Reputation: 0
Question Port redirect with help of IPTABLES


Hi,

I`ll try to explain

I have OpenVZ VPS with vdnet0:0 ip 1.1.1.1 (public ip) and some services witch i want to redirect to at 2.2.2.2 (public ip).
I need to redirect all requests on 1.1.1.1:80 to 2.2.2.2:80 (or all ports at once). Is it possible? If yes, please give example of IPTABLES shell commands to achieve it or a web/shell based script for easy IPTABLES control for starter.

Thank you all in adavcnce!

P.S. CentOS 5.2

Last edited by EgoX; 09-05-2010 at 09:19 AM.
 
Old 09-06-2010, 02:45 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Have a look below link it might help you.

Port Redirection Example

Port forwarding for iptables

Good tutorial Linux_Firewalls_Using_iptables
 
1 members found this post helpful.
  


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
with iptables, how-to redirect outgoing mail from port 25 to port 587 thumbelina Linux - Networking 12 03-19-2012 08:26 AM
Iptables redirect ip and port adrigo Linux - Server 8 07-16-2010 02:30 PM
debian iptables squid - redirect port 80 to port 8080 on another machine nickleus Linux - Networking 1 08-17-2006 12:59 AM
iptables port redirect/forwarding izghitu Linux - Newbie 1 02-01-2006 09:26 PM
Redirect port with iptables |DeJoTa| Linux - Networking 0 07-11-2003 01:31 AM

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

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