htrgouvea / nipe

An engine to make Tor network your default gateway

Home Page:https://heitorgouvea.me/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iptables v1.6.0: owner: Bad value for "--uid-owner" option: "tor" issue

opened this issue · comments

Hey, when I do the command

perl nipe.pl start

it gives me this error:

iptables v1.6.0: owner: Bad value for "--uid-owner" option: "tor"
Try iptables -h' or 'iptables --help' for more information. iptables v1.6.0: owner: Bad value for "--uid-owner" option: "tor" Try iptables -h' or 'iptables --help' for more information.

Do I have to do any changes on the iptables ? Thanks

You run the "perl nipe.pl install" command? What is your linux distribution? If you can send me the version of your iptables / perl is also interesting!

yes I ran perl nipe.pl install

cat /etc/*-release

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

iptables v1.6.0

perl --version

This is perl 5, version 26, subversion 2 (v5.26.2) built for x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

@danieleperera

Hi,

i think your problem can be resolved by following these steps:

  • navigate to {nipe_dir}/lib/Nipe
  • open Device.pm with your favorite editor
  • you should see the line: "my $operationalSystem = cat /etc/os-release | grep 'ID_LIKE' | cut -d '=' -f 2;"
  • replace it with "my $operationalSystem = cat /etc/os-release| grep -w 'ID' | cut -d '=' -f 2;" (without double quotes)

The reason is that that grepping on 'ID_LIKE' will not work on Debian systems (native, not Debian based).

I also suggest that you take a look at 9998dd4 and include the sleep command as well, modifying nipe.pl script (@GouveaHeitor IMHO it would be useful to include it in the current release)

Also make sure that you didn't start Tor separately either from the command line or via systemctl. I experienced some issues which for nipe is unable to establish a connection if tor is already running (@GouveaHeitor maybe this would be a useful point to include in the README.md file?).

Hope this helps!

perl nipe.pl install
syntax error at lib/Nipe/Device.pm line 5, near "cut -d "
Compilation failed in require at lib/Nipe/Start.pm line 5.
BEGIN failed--compilation aborted at lib/Nipe/Start.pm line 5.
Compilation failed in require at nipe.pl line 18.
BEGIN failed--compilation aborted at nipe.pl line 18.

Now it says that there is syntax error...

i pasted
my $operationalSystem = cat /etc/os-release| grep -w 'ID' | cut -d '=' -f 2;

@3zh7bae

Instead of this "my $operationalSystem = cat /etc/os-release| grep -w 'ID' | cut -d '=' -f 2;" code I tried replacing it with "my $operationalSystem = debian;" then When I ran perl nipe.install It didn't give me any errors but when i started nipe and then when i check the status it says

ERROR: sorry, it was not possible to establish a connection to the server.

@danieleperera
You can hardcode "debian" directly as a workaround but it's strange it's giving you that syntax error. It might be due to the single quote not being properly encoded when copying and pasting. To avoid such behavior just type in the equivalent of what you copied and pasted.

I also experienced your issue and I resolved by doing to following:

  • perl nipe.pl stop
  • systemctl stop tor
  • perl nipe.pl start

Did you also take a look at 9998dd4?

@3zh7bae I managed to make it work thanks.

Can I ask you something more...
I'd like to automate the installing process and I wrote a bash script to install nipe but it doesn't work well.
Have you got any suggestions?

This is the script

#!/bin/bash

git clone https://github.com/GouveaHeitor/nipe /root/home/git/tor
PATH=$PATH:/root/home/git/tor
cpan install Switch JSON LWP::UserAgent
/bin/perl /root/home/git/tor/nipe.pl install
/bin/perl /root/home/git/tor/nipe.pl start
exit 1

It gives me this error.
Can't locate Nipe/Stop.pm in @inc (you may need to install the Nipe::Stop module) (@inc contains: ./lib/ /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.2 /usr/local/share/perl/5.26.2 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /root/home/git/tor/nipe.pl line 17.
BEGIN failed--compilation aborted at /root/home/git/tor/nipe.pl line 17.
Can't locate Nipe/Stop.pm in @inc (you may need to install the Nipe::Stop module) (@inc contains: ./lib/ /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.2 /usr/local/share/perl/5.26.2 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /root/home/git/tor/nipe.pl line 17.
BEGIN failed--compilation aborted at /root/home/git/tor/nipe.pl line 17.

hey 3zh7bae,

I have the same error with Linux Mint.

root@VM:/tmp/nipe# perl nipe.pl status

[+] Status: disabled.
[+] Ip: 5.10.170.226

root@VM:/tmp/nipe# perl nipe.pl start
iptables v1.6.1: owner: Bad value for "--uid-owner" option: "tor"
Try 'iptables -h' or 'iptables --help' for more information.
iptables v1.6.1: owner: Bad value for "--uid-owner" option: "tor"
Try 'iptables -h' or 'iptables --help' for more information.
root@VM:/tmp/nipe#
root@VM:/tmp/nipe# perl nipe.pl status

[!] ERROR: sorry, it was not possible to establish a connection to the server.

root@VM:/tmp/nipe#

even when I change my lib/Nipe/Device to "my $operationalSystem = tor;"

root@VM:/tmp/nipe# uname -a
Linux VM 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@VM:/tmp/nipe# ls -la /usr/sbin/tor
lrwxrwxrwx 1 root root 10 Mär 3 2018 /usr/sbin/tor -> ../bin/tor
root@VM:/tmp/nipe# ls -la /usr/bin/tor
-rwxr-xr-x 1 root root 2969688 Mär 3 2018 /usr/bin/tor
root@VM:/tmp/nipe# tor --version
Tor version 0.3.2.10 (git-0edaa32732ec8930).

can you help and tell me whats going on?