Перейти к содержимому
Калькуляторы

Модифицированный модуль RAWNAT Натим и шейпим 2+ гбит/c с загрузкой ядер 2-3%

Тут есть https://github.com/alexey001/xtables-addons/

Коммит, в котором лежат оригинальные доделки топикстартера - 6ed53b134ed4f9eab671a21f799eaca4d4f5f7bb

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Не собирается...

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for gcc... gcc

checking whether the C compiler works... no

configure: error: in `/home/farton/xtables-addons-master':

configure: error: C compiler cannot create executables

See `config.log' for more details

 

 

Из интересного в config.log только

configure:3015: $? = 0

configure:3004: gcc -v >&5

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

configure:3015: $? = 0

configure:3004: gcc -V >&5

gcc: error: unrecognized option '-V'

gcc: fatal error: no input files

compilation terminated.

configure:3015: $? = 4

configure:3004: gcc -qversion >&5

gcc: error: unrecognized option '-qversion'

gcc: fatal error: no input files

compilation terminated.

configure:3015: $? = 4

configure:3035: checking whether the C compiler works

configure:3057: gcc conftest.c >&5

/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.22 internal error, aborting at ../../bfd/reloc.c line 443 in bfd_get_reloc_size

 

/usr/bin/ld: Please report this bug.

 

collect2: ld returned 1 exit status

configure:3061: $? = 1

configure:3099: result: no

configure: failed program was:

 

## ----------- ##

## confdefs.h. ##

## ----------- ##

 

/* confdefs.h */

#define PACKAGE_NAME "xtables-addons"

#define PACKAGE_TARNAME "xtables-addons"

#define PACKAGE_VERSION "2.4"

#define PACKAGE_STRING "xtables-addons 2.4"

#define PACKAGE_BUGREPORT ""

#define PACKAGE_URL ""

#define PACKAGE "xtables-addons"

#define VERSION "2.4"

 

configure: exit 77

Изменено пользователем myth

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Гранатыгцц не той системы?

gcc: error: unrecognized option '-V'

А лучше полный лог.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by xtables-addons configure 2.4, which was
generated by GNU Autoconf 2.68.  Invocation command line was

 $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = nas1
uname -m = x86_64
uname -r = 3.13.0-71-generic
uname -s = Linux
uname -v = #114~precise1-Ubuntu SMP Tue Dec 1 19:37:38 UTC 2015

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2227: checking for a BSD-compatible install
configure:2295: result: /usr/bin/install -c
configure:2308: checking whether build environment is sane
configure:2358: result: yes
configure:2499: checking for a thread-safe mkdir -p
configure:2538: result: /bin/mkdir -p
configure:2551: checking for gawk
configure:2567: found /usr/bin/gawk
configure:2578: result: gawk
configure:2589: checking whether make sets $(MAKE)
configure:2611: result: yes
configure:2739: checking for gcc
configure:2755: found /usr/bin/gcc
configure:2766: result: gcc
configure:2995: checking for C compiler version
configure:3004: gcc --version >&5
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3015: $? = 0
configure:3004: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
configure:3015: $? = 0
configure:3004: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3015: $? = 4
configure:3004: gcc -qversion >&5
gcc: error: unrecognized option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3015: $? = 4
configure:3035: checking whether the C compiler works
configure:3057: gcc    conftest.c  >&5
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.22 internal error, aborting at ../../bfd/reloc.c line 443 in bfd_get_reloc_size

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status
configure:3061: $? = 1
configure:3099: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "xtables-addons"
| #define PACKAGE_TARNAME "xtables-addons"
| #define PACKAGE_VERSION "2.4"
| #define PACKAGE_STRING "xtables-addons 2.4"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "xtables-addons"
| #define VERSION "2.4"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3104: error: in `/home/farton/xtables-addons-master':
configure:3106: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/farton/xtables-addons-master/build-aux/missing --run aclocal-1.11'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AR=''
AUTOCONF='${SHELL} /home/farton/xtables-addons-master/build-aux/missing --run autoconf'
AUTOHEADER='${SHELL} /home/farton/xtables-addons-master/build-aux/missing --run autoheader'
AUTOMAKE='${SHELL} /home/farton/xtables-addons-master/build-aux/missing --run automake-1.11'
AWK='gawk'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/farton/xtables-addons-master/build-aux/missing --run makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='xtables-addons'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='xtables-addons'
PACKAGE_STRING='xtables-addons 2.4'
PACKAGE_TARNAME='xtables-addons'
PACKAGE_URL=''
PACKAGE_VERSION='2.4'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
VERSION='2.4'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/farton/xtables-addons-master/build-aux/install-sh'
kbuilddir=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
regular_CFLAGS=''
regular_CPPFLAGS=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
xtlibdir=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "xtables-addons"
#define PACKAGE_TARNAME "xtables-addons"
#define PACKAGE_VERSION "2.4"
#define PACKAGE_STRING "xtables-addons 2.4"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "xtables-addons"
#define VERSION "2.4"

configure: exit 77

Изменено пользователем myth

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Тут я конечно не очень соображаю, но попробуйте

apt-get install g++ libc6-dev linux-libc-dev && apt-get update gcc

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Помогает обновление до последней версии binutils, но затыкается на

 

./configure: line 11587: syntax error near unexpected token `libxtables,'

./configure: line 11587: `PKG_CHECK_MODULES(libxtables, xtables >= 1.4.5)'

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

обновите iptables, autoconf и pkg-config

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

кстати, а может имеет смысл скрестить данный модуль с ipset?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Решение интересное, но не хватает хэш-таблиц. Без них решение получается частное. Например, если этим модулем попробовать занатить трафик с адреса 10.0.10.10 на 1.1.1.1 и с 192.168.10.10 на 2.2.2.2 то в одной таблице будет создано всего лишь одно правило, для ната трафика x.x.10.10 на 2.2.2.2 (или 1.1.1.1 в завимости от того, какое правило будет добавлено последним). Это связано с тем, что под список IP-адресов выделено 0xFFFF байт, в которых хранятся адреса, а этого хватает только на два последних октета IP-адреса, поэтому будут возникать подобные коллизии.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 смайлов.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.