install xtables-addons in proxmox

L

luka

Guest
I wanted to install xtables-addons in proxmox, but when I run the auto installation I found an error message containing an order to use linux-header 2.6.32.18-pve. but when i run "apt-get install linux-headers-2.6.32-18-pve" i got message "E: Unable to locate package linux-headers-2.6.32-18-pve
E: Couldn't find any package by regex 'linux-headers-2.6.32-18-pve' "
I'll be glad to receive any kind of help and advise on this matter
 
You need put no-subscribe repos on your sources.list.

Follow This Procedures.

https://pve.proxmox.com/wiki/Package_repositories

i tryed use dkms xtables from debian.

Code:
dpkg-reconfigure xtables-addons-dkms -- no sucess.

Code:
Done.
Loading new xtables-addons-1.42 DKMS files...
Building for 2.6.32-32-pve and 3.10.0-5-pve
Building initial module for 2.6.32-32-pve
Error!  Build of xt_ACCOUNT.ko failed for: 2.6.32-32-pve (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/xtables-addons/1.42/build/ for more information.

Code:
expr: syntax error
make: Entering directory `/usr/src/linux-headers-2.6.32-32-pve'
  CC [M]  /usr/src/xtables-addons-1.42/compat_xtables.o
  CC [M]  /usr/src/xtables-addons-1.42/xt_CHAOS.o
  CC [M]  /usr/src/xtables-addons-1.42/xt_DELUDE.o
  CC [M]  /usr/src/xtables-addons-1.42/xt_DHCPMAC.o
  CC [M]  /usr/src/xtables-addons-1.42/xt_DNETMAP.o
/usr/src/xtables-addons-1.42/xt_DNETMAP.c: In function ‘dnetmap_tg’:
/usr/src/xtables-addons-1.42/xt_DNETMAP.c:318:14: warning: unused variable ‘net’ [-Wunused-variable]
  CC [M]  /usr/src/xtables-addons-1.42/xt_ECHO.o
/usr/src/xtables-addons-1.42/xt_ECHO.c: In function ‘echo_tg6’:
/usr/src/xtables-addons-1.42/xt_ECHO.c:36:16: error: storage size of ‘fl’ isn’t known
/usr/src/xtables-addons-1.42/xt_ECHO.c:99:37: error: implicit declaration of function ‘flowi6_to_flowi’ [-Werror=implicit-function-declaration]
/usr/src/xtables-addons-1.42/xt_ECHO.c:119:2: error: implicit declaration of function ‘ip6_local_out’ [-Werror=implicit-function-declaration]
/usr/src/xtables-addons-1.42/xt_ECHO.c:36:16: warning: unused variable ‘fl’ [-Wunused-variable]
cc1: some warnings being treated as errors
make[1]: *** [/usr/src/xtables-addons-1.42/xt_ECHO.o] Error 1
make: *** [_module_/usr/src/xtables-addons-1.42] Error 2
make: Leaving directory `/usr/src/linux-headers-2.6.32-32-pve'
 
Solution:

#Install Packages
Code:
apt-get update  
apt-get install iptables iptables-dev module-assistant xtables-addons-common libtext-csv-xs-perl unzip

#After That, Build Geoip Database

Code:
cd /usr/lib/xtables-addons/  
./xt_geoip_dl
./xt_geoip_build GeoIPCountryWhois.csv
mkdir -p /usr/share/xt_geoip/  
cp -r {BE,LE} /usr/share/xt_geoip/

# Also, Do Not Forget Install the pve kernel headers
Code:
apt-get install pve-headers-`uname -r`

# Next, edit compile options for xtables-addons

Code:
nano /usr/src/modules/xtables-addons/mconfig

# Now remove the end-of-line "m" from all lines except for
# the following: build_geoip, build_pknock and build_psd.
# Save the file with Ctrl-O and exit nano with Ctrl-X.

Code:
chattr +i /usr/src/modules/xtables-addons/mconfig

# Finally, Run the "module-assistant"

Code:
module-assistant --verbose --text-mode auto-install xtables-addons
 
Hello together,

the solution above worked for me very well until i update to Proxmox 4 :)

Now i cant build the xtables addon .

The following Error appears


debian/rules:59: recipe for target 'override_dh_auto_clean' failed
make[1]: *** [override_dh_auto_clean] Error 2
make[1]: Leaving directory '/usr/src/modules/xtables-addons'
/usr/share/modass/include/common-rules.make:56: recipe for target 'kdist_build' failed
make: *** [kdist_build] Error 2
BUILD FAILED!
See /var/cache/modass/xtables-addons-source.buildlog.4.2.2-1-pve.1445715180 for details.
Bauvorgang fehlgeschlagen. Zum Weitermachen Return drücken...






Can someone help me?

Greets
 
Hello together,

the solution above worked for me very well until i update to Proxmox 4 :)

Now i cant build the xtables addon .

The following Error appears


debian/rules:59: recipe for target 'override_dh_auto_clean' failed
make[1]: *** [override_dh_auto_clean] Error 2
make[1]: Leaving directory '/usr/src/modules/xtables-addons'
/usr/share/modass/include/common-rules.make:56: recipe for target 'kdist_build' failed
make: *** [kdist_build] Error 2
BUILD FAILED!
See /var/cache/modass/xtables-addons-source.buildlog.4.2.2-1-pve.1445715180 for details.
Bauvorgang fehlgeschlagen. Zum Weitermachen Return drücken...






Can someone help me?

Greets


Hello,

It seems that xtables-addons 2.8 (resp. 2.7) is needed to compile with kernel 4.2 (resp. 4.1)
Unfortunately Debian Jessie is still 2.6 :(

Greets
 
Hi there

I managed to compile and install xt_geoip from the packages on the repo (that's the only one I was interested in)

If that's enough I can tell you how to do it... maybe it's extensible to some other modules on xtables-addons...

Cheers
 
I managed to compile xtable-addons by including Debian Stretch main repo and playing with packages priorities

in /etc/apt/sources.list add :

create /etc/apt/preferences containing :
Package: xtables-*
Pin: release o=Debian,a=testing,n=stretch,l=Debian,c=main
Pin-Priority: 600

Package: *
Pin: release o=Debian,a=testing,n=stretch,l=Debian,c=main
Pin-Priority: 1

then :
apt-get update
apt-get install xtables-addons-dkms


And fortunately xtables-addons packages are dependencies friendly, so that you will have latest xtables-addons installed without more package needed
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!