Bettercap version you are using.
2.6
OS version and architecture you are using.
Gentoo GNU/Linux (64-bit)
Go version if building from sources.
1.10.2
Command line arguments you are using.
sudo ./bettercap -debug -caplet ./caplets/web-override.cap
Full debug output while reproducing the issue ( bettercap -debug ... ).
bettercap v2.6 (type 'help' for a list of commands)
[19:51:08] [mod.started] update
[19:51:08] [sys.log] [inf] Reading from caplet ./caplets/web-override.cap ...
[19:51:08] [sys.log] [inf] Checking latest stable release ...
[19:51:08] [sys.log] [inf] Loading proxy script caplets/web-override.js ...
[19:51:08] [sys.log] [dbg] Proxy script caplets/web-override.js loaded.
[19:51:08] [sys.log] [inf] Enabling forwarding.
ERROR for 'iptables [-t nat -A PREROUTING -i eth0 -p TCP --dport 80 -j DNAT --to 10.0.0.10:8080]': exit status 3
10.0.0.0/24 > 10.0.0.10 禄 [19:51:08] [sys.log] [err] Error while running caplet ./caplets/web-override.cap: exit status 3
10.0.0.0/24 > 10.0.0.10 禄 [19:51:08] [sys.log] [inf] You are running 2.6 which is the latest stable version.
10.0.0.0/24 > 10.0.0.10 禄 [19:51:08] [mod.stopped] update
10.0.0.0/24 > 10.0.0.10 禄 exit
[19:51:13] [mod.stopped] events.stream
Stopping modules and cleaning session state ...
ERROR for 'iptables [-t nat -D PREROUTING -i eth0 -p TCP --dport 80 -j DNAT --to 10.0.0.10:8080]': exit status 3
This happens with any other module or caplet that has to set iptables rules.
I don't think it's because of the brackets, that's how Go prints a slice of strings (the shell command arguments in this case).
Trying to find the meaning of exit status 3 for iptables
@d33r what is your iptables --version ?
Okay, apparently I didn't search far enough...
Fixed it by enabling CONFIG_IP_NF_NAT in my kernel.
Most helpful comment
Okay, apparently I didn't search far enough...
Fixed it by enabling CONFIG_IP_NF_NAT in my kernel.