OpenVZ Forum


Home » General » Support » iptables
iptables [message #775] Mon, 09 January 2006 19:00 Go to next message
rsaylor is currently offline  rsaylor
Messages: 43
Registered: December 2005
Member
iptables appears not to be working on my VPS or I might have the config incorrect.

Config:

vzctl set SID --iptables iptable_filter --iptables ipt_length --iptables ipt_limit --iptables iptable_mangle --iptables ipt_REJECT --save

However, I get the following error reports:

iptables v1.2.11: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Re: iptables [message #776 is a reply to message #775] Mon, 09 January 2006 19:02 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

What distro?

Just Because You Have One, Doesn't Mean You Have To Be One!
Re: iptables [message #777 is a reply to message #776] Mon, 09 January 2006 19:12 Go to previous messageGo to next message
rsaylor is currently offline  rsaylor
Messages: 43
Registered: December 2005
Member
Hi, I am using CentOS 4.2 for the main server and CentOS 4 for the VPS
Re: iptables [message #781 is a reply to message #775] Tue, 10 January 2006 09:59 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
Probably you haven't loaded required modules on hardware node before VPS start.

http://static.openvz.org/openvz_userbar_en.gif
Re: iptables [message #819 is a reply to message #781] Sat, 14 January 2006 23:35 Go to previous messageGo to next message
Valmont is currently offline  Valmont
Messages: 225
Registered: September 2005
Senior Member
Hi!

On trustix 3.0 I can't build module ULOG in netfilter with openvz kernel 2.6.8-022stab061-up (In past I cannot make it with other openvz kernel)

I get this:

root@server /usr/src/linux-vz# make modules CC="gcc -fno-stack-protector"
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CC [M] net/ipv4/netfilter/ipt_ULOG.o
net/ipv4/netfilter/ipt_ULOG.c:133:2: #error timer context should be evaluated
make[3]: *** [net/ipv4/netfilter/ipt_ULOG.o] Error 1
make[2]: *** [net/ipv4/netfilter] Error 2
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2


With kernel 2.6.14.2 module create with sucсess. It's a bug, or I made something wrong? What information should I provide? May I post here my .config?


Thank you.

[Updated on: Sat, 14 January 2006 23:37]

Report message to a moderator

Re: iptables [message #834 is a reply to message #819] Mon, 16 January 2006 12:34 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
Just remove this string (ipt_ULOG.c:133). This error is obsoleted and should be removed.

http://static.openvz.org/openvz_userbar_en.gif
Re: iptables [message #858 is a reply to message #834] Mon, 16 January 2006 17:57 Go to previous messageGo to next message
Valmont is currently offline  Valmont
Messages: 225
Registered: September 2005
Senior Member
Thanks, all ok Smile.
Re: iptables [message #2345 is a reply to message #775] Wed, 29 March 2006 21:33 Go to previous messageGo to next message
eugeniopacheco is currently offline  eugeniopacheco
Messages: 40
Registered: November 2005
Member
I'm getting the same problem running the host on fedora core 4 and the vps on debian3.1 minimal...

painel:~# iptables -I INPUT -p tcp --dport 80
iptables v1.2.11: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
painel:~#


Anyway to fix that? Here is my /etc/sysctl.conf (not a linux expert, so I don't really know what sysctl.conf means, maybe the error is there, never know...):

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(Cool and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

Regards,

Eugenio Pacheco
Re: iptables [message #2353 is a reply to message #2345] Thu, 30 March 2006 10:34 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
In order to determine what's wrong, I need outputs of the following commands:
1) lsmod before VPS start
2) cat /etc/sysconfig/vz
3) cat /etc/sysconfig/vz-scripts/<VPSID>.conf

Most probably, you have not loaded necessary modules before VPS start.


http://static.openvz.org/openvz_userbar_en.gif
Re: iptables [message #2361 is a reply to message #2353] Thu, 30 March 2006 17:22 Go to previous messageGo to next message
eugeniopacheco is currently offline  eugeniopacheco
Messages: 40
Registered: November 2005
Member
Here is all the information you asked, can you please help me?Smile

[root@t248 ~]# service vz stop
Stopping OpenVZ: [ OK ]
[root@t248 ~]# lsmod
Module Size Used by
sch_ingress 2852 1
cls_u32 6308 3
sch_sfq 4480 2
sch_htb 22144 1
simfs 3612 0
vzdquota 38576 0 [permanent]
vzdev 1792 1 vzdquota
thermal 10096 0
processor 10244 1 thermal
fan 2668 0
button 4408 0
battery 7052 0
asus_acpi 8920 0
ac 3084 0
8139too 20160 0
e100 31552 0
mii 3808 2 8139too,e100
usbcore 100356 1
[root@t248 ~]# service vz start
Starting OpenVZ: [ OK ]
lBringing up interface venet0: [ OK ]
Configuring interface venet0: net.ipv4.conf.venet0.send_redirects = 0
[ OK ]
Starting VPS 101: smod
[ OK ]
[root@t248 ~]# lsmod
Module Size Used by
vznetdev 12480 2
vzmon 41664 2 vznetdev
af_packet 16360 0
ipt_length 1504 1
ipt_ttl 1632 1
ipt_tcpmss 1920 1
ipt_TCPMSS 3648 1
iptable_mangle 4256 1
iptable_filter 4096 1
ipt_multiport 1760 1
ipt_limit 1952 1
ipt_tos 1408 1
ipt_REJECT 5568 1
ip_tables 20848 10 ipt_length,ipt_ttl,ipt_tcpmss,ipt_TCPMSS,iptable_mangle,ipta ble_filter,ipt_multiport,ipt_limit,ipt_tos,ipt_REJECT
sch_ingress 2852 1
cls_u32 6308 3
sch_sfq 4480 2
sch_htb 22144 1
simfs 3612 1
vzdquota 38576 1 [permanent]
vzdev 1792 3 vznetdev,vzmon,vzdquota
thermal 10096 0
processor 10244 1 thermal
fan 2668 0
button 4408 0
battery 7052 0
asus_acpi 8920 0
ac 3084 0
8139too 20160 0
e100 31552 0
mii 3808 2 8139too,e100
usbcore 100356 1

[root@t248 ~]# vzctl stop 101
Stopping VPS ...
VPS was stopped
VPS is unmounted
[root@t248 ~]# lsmod
Module Size Used by
vznetdev 12480 3
vzmon 41664 2 vznetdev
af_packet 16360 0
ipt_length 1504 1
ipt_ttl 1632 1
ipt_tcpmss 1920 1
ipt_TCPMSS 3648 1
iptable_mangle 4256 1
iptable_filter 4096 1
ipt_multiport 1760 1
ipt_limit 1952 1
ipt_tos 1408 1
ipt_REJECT 5568 1
ip_tables 20848 10 ipt_length,ipt_ttl,ipt_tcpmss,ipt_TCPMSS,iptable_mangle,ipta ble_filter,ipt_multiport,ipt_limit,ipt_tos,ipt_REJECT
sch_ingress 2852 1
cls_u32 6308 3
sch_sfq 4480 2
sch_htb 22144 1
simfs 3612 1
vzdquota 38576 1 [permanent]
vzdev 1792 3 vznetdev,vzmon,vzdquota
thermal 10096 0
processor 10244 1 thermal
fan 2668 0
button 4408 0
battery 7052 0
asus_acpi 8920 0
ac 3084 0
8139too 20160 0
e100 31552 0
mii 3808 2 8139too,e100
usbcore 100356 1
[root@t248 ~]#

[root@t248 ~]# vzctl start 101
Starting VPS ...
VPS is mounted
Setting CPU units: 13738
File resolv.conf was modified
VPS start in progress...
[root@t248 ~]# lsmod
Module Size Used by
vznetdev 12480 5
vzmon 41664 3 vznetdev
af_packet 16360 0
ipt_length 1504 2
ipt_ttl 1632 2
ipt_tcpmss 1920 2
ipt_TCPMSS 3648 2
iptable_mangle 4256 2
iptable_filter 4096 2
ipt_multiport 1760 2
ipt_limit 1952 2
ipt_tos 1408 2
ipt_REJECT 5568 2
ip_tables 20848 10 ipt_length,ipt_ttl,ipt_tcpmss,ipt_TCPMSS,iptable_mangle,ipta ble_filter,ipt_multiport,ipt_limit,ipt_tos,ipt_REJECT
sch_ingress 2852 1
cls_u32 6308 3
sch_sfq 4480 2
sch_htb 22144 1
simfs 3612 2
vzdquota 38576 2 [permanent]
vzdev 1792 3 vznetdev,vzmon,vzdquota
thermal 10096 0
processor 10244 1 thermal
fan 2668 0
button 4408 0
battery 7052 0
asus_acpi 8920 0
ac 3084 0
8139too 20160 0
e100 31552 0
mii 3808 2 8139too,e100
usbcore 100356 1

[root@t248 ~]# cat /etc/sysconfig/vz
## Global parameters
VIRTUOZZO=yes
LOCKDIR=/vz/lock
VE0CPUUNITS=1000

## Logging parameters
LOGGING=yes
LOGFILE=/var/log/vzctl.log
LOG_LEVEL=0

## Disk quota parameters
DISK_QUOTA=yes
VZFASTBOOT=no

# The name of the device whose ip address will be used as source ip for VE.
# By default automatically assigned.
#VE_ROUTE_SRC_DEV="eth0"

## Template parameters
TEMPLATE=/vz/template

## Defaults for VEs
VE_ROOT=/vz/root/$VEID
VE_PRIVATE=/vz/private/$VEID
CONFIGFILE="vps.basic"
DEF_OSTEMPLATE="fedora-core-4"

## Load vzwdog module
VZWDOG="no"

IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"

[root@t248 ~]#
[root@t248 ~]# cat /etc/sysconfig/vz-scripts/101.conf
# This is an example configuration file for so-called "vps.basic" VPS.
# Copyright (C) 2000-2005 SWsoft. All rights reserved.
#
# This file may be distributed under the terms of the Q Public License
# as defined by Trolltech AS of Norway and appearing in the file
# LICENSE.QPL included in the packaging of this file.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

ONBOOT="yes"

# UBC parameters (in form of barrier:limit)
# Primary parameters
AVNUMPROC="209:209"
NUMPROC="800:800"
NUMTCPSOCK="800:800"
NUMOTHERSOCK="800:800"
VMGUARPAGES="15977:2147483647"
# Secondary parameters
KMEMSIZE="5141514:8855665"
TCPSNDBUF="2437038:5713838"
TCPRCVBUF="2437038:5713838"
OTHERSOCKBUF="1218519:4495319"
DGRAMRCVBUF="1218519:1218519"
OOMGUARPAGES="15977:2147483647"
# Auxiliary parameters
LOCKEDPAGES="836:836"
SHMPAGES="9586:9586"
PRIVVMPAGES="80862:85448"
NUMFILE="6688:6688"
NUMFLOCK="668:734"
NUMPTY="80:80"
NUMSIGINFO="1024:1024"
DCACHESIZE="3740085:3852288"

PHYSPAGES="0:2147483647"
NUMIPTENT="200:200"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="20971520:22971520"
DISKINODES="2880189:2968209"
QUOTATIME="0"

# CPU fair sheduler parameter
CPUUNITS="13738"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="debian-3.1-i386-minimal"
ORIGIN_SAMPLE="vps.10"
...

Re: iptables [message #2362 is a reply to message #2361] Thu, 30 March 2006 17:52 Go to previous message
eugeniopacheco is currently offline  eugeniopacheco
Messages: 40
Registered: November 2005
Member
Hi,

After I did these things in order to get these informations (restart vz service and the VPS), now iptables is working in the VPS... Interesting:)

Thanks for your help..

Eugenio Pacheco
Previous Topic: PPC support?
Next Topic: CentOS 4.3 - rmmod
Goto Forum:
  


Current Time: Sat Jul 13 23:44:56 GMT 2024

Total time taken to generate the page: 0.02232 seconds