LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Port redirect with help of IPTABLES (https://www.linuxquestions.org/questions/linux-networking-3/port-redirect-with-help-of-iptables-830455/)

EgoX 09-05-2010 08:52 AM

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! :hattip:

P.S. CentOS 5.2

sem007 09-06-2010 02:45 AM

Have a look below link it might help you.

Port Redirection Example

Port forwarding for iptables

Good tutorial Linux_Firewalls_Using_iptables


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