Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iptables unknown option "-J" #1

Closed
marek22k opened this issue Sep 20, 2022 · 8 comments
Closed

iptables unknown option "-J" #1

marek22k opened this issue Sep 20, 2022 · 8 comments

Comments

@marek22k
Copy link

sudo iptables -t mangle -I INPUT -p udp -m udp --sport 52925 -J WGOBFS --key mysecretkey --unobfs
iptables v1.8.7 (nf_tables): unknown option "-J"
Try `iptables -h' or 'iptables --help' for more information.

OS: Debian 11 (fresh install)

@infinet
Copy link
Owner

infinet commented Sep 20, 2022

Lowercase, -j

@marek22k
Copy link
Author

marek22k commented Sep 20, 2022

$ sudo iptables -t mangle -I INPUT -p udp -m udp --sport 52925 -j WGOBFS --key mysecretkey --unobfs
iptables v1.8.7 (nf_tables): unknown option "--key"
Try `iptables -h' or 'iptables --help' for more information.

$ ls /usr/lib/x86_64-linux-gnu/xtables | grep libxt_WG
libxt_WGOBFS.so

@infinet
Copy link
Owner

infinet commented Sep 20, 2022

Have you built and installed libxt_WGOBFS.so?

@marek22k
Copy link
Author

marek22k commented Sep 20, 2022

Yes, I have.

$ ls /lib/modules/5.10.0-18-amd64/kernel/net/netfilter/ | grep xt_WG
xt_WGOBFS.ko

@infinet
Copy link
Owner

infinet commented Sep 20, 2022

That is the kernel module. You also need userland. See readme.

@marek22k
Copy link
Author

Userland?
I only see

Run make in kernel/ to build kernel module. Copy xt_WGOBFS.ko to /lib/modules/yourkernelversion/kernel/net/netfilter/, then run depmod -a.

Run make in xtables/ to build iptables extension. Copy libxt_WGOBFS.so to xtables directory.

and I did both.

@infinet
Copy link
Owner

infinet commented Sep 21, 2022

Somehow Debian 11 does not load the kernel module automatically. Need modprobe xt_WGOBFS. See updated readme.

@marek22k
Copy link
Author

Works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants