OpenVZ Forum


Home » General » Support » OpenVZ and Iptables
OpenVZ and Iptables [message #16446] Thu, 06 September 2007 18:06 Go to next message
rodrigosprimo is currently offline  rodrigosprimo
Messages: 1
Registered: September 2007
Location: Brazil
Junior Member
Hi there,

I'm trying to configure a firewall on a VM running Debian 4.0. The Hardware Node runs CentOS (kernel 2.6.9-023stab043.2-smp) with OpenVZ.

I'm using the following rules:

iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

iptables -A INPUT -j ACCEPT -p tcp --dport 21
iptables -A INPUT -j ACCEPT -p tcp --dport 22
iptables -A INPUT -j ACCEPT -p tcp --dport 80

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

The last rule fail with this error message:

utopia:~# iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables: No chain/target/match by that name

On my machine running Ubuntu 7.04 I can use this rules without problem. So I think this might be related with some missing kernel module, but I can't find out which. Any ideas?

Thanks, Rodrigo.
Re: OpenVZ and Iptables [message #16467 is a reply to message #16446] Fri, 07 September 2007 14:35 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hi,

are you able to run successfully this command on HN?


Thanks,
Vasily

Re: OpenVZ and Iptables [message #16484 is a reply to message #16446] Sat, 08 September 2007 18:54 Go to previous message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
If you want to have a firewall on your host node... and firewall your VPSes... and control everything from the host node... the firewall script in the OpenVZ wiki works really well and is pretty simple to understand:

http://wiki.openvz.org/Setting_up_an_iptables_firewall

Since you are using CentOS on your hardware node, it will work without any modifications.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Previous Topic: Does OpenVZ provide a non-linux based Windows solution?
Next Topic: kernel upgrade issue in vps
Goto Forum:
  


Current Time: Thu Jul 18 05:34:40 GMT 2024

Total time taken to generate the page: 0.02663 seconds