Closed Soberia closed 1 year ago
Are you trying to build this module for host OS? That dockerfile uses alpine, while the host OS looks like ubuntu.
No, I want to run it inside the container.
I used Alpine because I faced this error when executing ./configure
on Ubuntu/Debian base image:
checking for linux/netfilter/x_tables.h... yes
./configure: line 12787: syntax error near unexpected token `libxtables,'
./configure: line 12787: `PKG_CHECK_MODULES(libxtables, xtables >= 1.4.21)'
I've installed libxtables-dev
because there is no iptables-dev
in package repository.
I am not sure you can do that. Docker on linux still uses host kernel. It may be possible to build with Ubuntu/Debian base image, but I haven't tried. Can you use a Debian 10 base image? That is the version I tested.
iptables-dev
was present in Debian 10 (unlike Debian bullseye) and installed successfully. But still got same error as before when ruuning ./configure
.
I also tried to compile the source on the host and move the binaries to the container but still get this syntax error ... libxtables
.
Host is Ubuntu 22.10 with 5.19.0-26 kernel
Have installed pkg-config?
No, but installing that package also didn't help me.
These are the two lines that cause the error in generated configure
file at line 12787 and 12788:
PKG_CHECK_MODULES(libxtables, xtables >= 1.4.21)
xtlibdir="$($PKG_CONFIG --variable=xtlibdir xtables)"
I tested under ubuntu 22.10. Apparently /usr/bin is not in root's PATH therefore configure cannot find pkg-config.
Thanks for your help.
It was due to absence of pkg-config
package. ./autogen.sh
must run again after installing the package.
build-essential
, autoconf
, libtool
, pkg-config
and libxtables-dev
are packages needed for Ubuntu.
After completing the installation of the module for server (Ubuntu) and client (OpenWRT), I started WireGuard instances and noticed packets won't reach the server at all or reached with high delay (more than 30 second). For that reason, the handshake process will never finish.
I tried resending the captured packets manually with netcat
and result was the same. I think it's result of nationwide blocking of UDP packets in Iran and nothing can be done about it.
Thanks again, I close this issue now.
I have struggled with make a Docker container. I've mounted
/lib/modules:/lib/modules
and/usr/src:/usr/src
for accessing the host kernel when running the container, but compile process failed withobjtool: not found
which is actually exist on said directory on the Docker host.Dockerfile
```dockerfile FROM alpine:latest RUN apk update && \ apk add curl unzip iptables-dev alpine-sdk linux-lts-dev autoconf automake libtool; \ # mkdir /tmp && cd /tmp; \ curl -sSL -o archive.zip https://github.com/infinet/xt_wgobfs/archive/refs/heads/main.zip; \ unzip archive.zip; \ cd xt_wgobfs-main; \ # ./autogen.sh; \ ./configure; WORKDIR /tmp/xt_wgobfs-main CMD make ```