I have android with iptables support on a rooted device.
I seem to get this error, anyone have any idea why?
iptables -A INPUT -p tcp -i eth0 --dport 8000 -m state --state NEW -j ACCEPT
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378
Android uses Bionic libc, which is a really minimal libc that is missing lots of things. That error message is saying that getprotobyname()
is not implemented in Bionic libc. iptables
seems to run the command anyway when this error is triggered, but my guess is that its ignoring the -p tcp
part and just setting the rule for all protocols.
Luckily that function is not essential to working with iptables. getprotobyname()
just converts protocol names like tcp to a number (tcp == 6). You can find those numbers here: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
Use the protocol number instead -p 6
to eliminate the error message:
iptables -A INPUT -p 6 -i eth0 --dport 8000 -m state --state NEW -j ACCEPT
You can type 6 instead of tcp.
iptables -A INPUT -p 6 (instead of iptables -A INPUT -p tcp )
http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With