LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-13-2010, 01:02 PM   #1
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Rep: Reputation: 4
OpenVZ iptables rule not working on local network


Hi,

I have installed OpenVZ on a CentOS 5.5 server in our Office.
The HN IP is static and its IP is 192.168.1.70

I have created a VPS/VE/Container with ID 110 and IP 192.168.1.110
/proc/sys/net/ipv4/ip_forward is set TO 1

Now I have passed the following iptables command:
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 5454 -d ! 192.168.1.70/32 -j DNAT --to-destination 192.168.1.70:5454

http://192.168.1.70:5454 has our Control Panel and we wanted that anyone accessing the address http://192.168.1.110:5454 to view the Control Panel.

But this is not working. I can ping the IP 192.168.1.110 from anywhere on the network. But the URL http://192.168.1.110:5454 is not being forwarded to http://192.168.1.70:5454

What could be the reason for it ?

Please help me!
 
Old 08-15-2010, 03:27 PM   #2
Nemesiz
Member
 
Registered: Oct 2007
Posts: 47

Rep: Reputation: 2
Maybe
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 5454 -d 192.168.1.110/32 -j DNAT --to-destination 192.168.1.70:5454
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables: rule with RETURN target just after a rule with ACCEPT target Nerox Linux - Networking 6 09-04-2011 03:33 PM
Block all outgoing requests from IP. (iptables+OpenVZ) sappi Linux - General 3 01-10-2010 02:50 PM
SSH not working on local network Patrick_B Linux - Networking 8 07-24-2009 10:21 AM
[SOLVED] Iptables firewall and gateway for local network not working. Mogget Linux - Networking 4 03-12-2009 12:41 AM
Another iptables rule set not working LinuxIsGR8 Linux - Security 14 02-06-2009 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

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