htrgouvea / nipe

An engine to make Tor network your default gateway
https://heitorgouvea.me/
Other
1.95k stars 314 forks source link

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

Open Loloman2 opened 4 years ago

Loloman2 commented 4 years ago

[!] ERROR: sorry, it was not possible to establish a connection to the server. Any fix? I did follow instructions.

htrgouvea commented 4 years ago

Hi @Loloman2,

You can try to test Nipe again? I think this is resolved with the lasted commit.

Thx

htrgouvea commented 4 years ago

Hi @Loloman2, Any updates?

ghost commented 4 years ago

hello, i have same problem, when i run nipe start it gives me that phrase, also when i ran the cpan comand it gave me that everything is up to date, and i even try udate perl, to see if it was the issue, idk what is wrong please help.

ghost commented 4 years ago

fixed. did the iptables -F command and it fixed

supriyo97 commented 4 years ago

I'm facing the same issue @GouveaHeitor in my Manjaro 20.0 while I typed "sudo perl nipe.pl status". can you help?

htrgouvea commented 4 years ago

Hi @supriyo97, Have you tried to check if you already have rules in iptbles that could cause conflicts? Use: $ iptables -L

Thx

supriyo97 commented 4 years ago

`[sap@DELL-X nipe]$ sudo iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination

Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination
ACCEPT all -- anywhere anywhere state ESTABLISHED ACCEPT all -- anywhere anywhere owner UID match tor ACCEPT udp -- anywhere anywhere udp dpt:90 ACCEPT tcp -- anywhere anywhere tcp dpt:90 ACCEPT tcp -- anywhere 10..0.0/
ACCEPT all -- anywhere 127.0.0./
ACCEPT all -- anywhere 192.168.0.0/*
ACCEPT all -- anywhere 1..0.0/*
ACCEPT all -- anywhere 1
.0.0.0/*
ACCEPT tcp -- anywhere anywhere
REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable REJECT icmp -- anywhere anywhere reject-with icmp-port-unreachable`

this is what I got. ???

Antigo-Antigo commented 4 years ago

Fala amigo estou tendo o mesmo problema que os colegas acima, tentei resolver de diversas formas mas não consegui. Estou utilizando o Manjaro 4.6.

Eu dei uma olhada nos arquivos e pensei que o problema poderia ser nas chamados dos diretórios do tor no programa, pelo menos no manjaro, por exemplo existem algumas chamadas em var/lib/tor porem esse patch é inexistente com a instalação padrão do tor.

Quando faço a instalação do tor na versão 0.4.3.5-2 no manjaro o patch dos arquivos fica assim, e as chamadas no programa são em diretórios diferentes, da uma olhada se valer a pena :+1:

/etc/tor/torrc /etc/tor/torrc-dist /usr/bin/tor /usr/bin/tor-gencert /usr/bin/tor-print-ed-signing-cert /usr/bin/tor-resolve /usr/bin/torify /usr/lib/systemd/system/tor.service /usr/lib/sysusers.d/tor.conf /usr/lib/tmpfiles.d/tor.conf /usr/share/doc/tor/tor-gencert.html /usr/share/doc/tor/tor-print-ed-signing-cert.html /usr/share/doc/tor/tor-resolve.html /usr/share/doc/tor/tor.html /usr/share/doc/tor/torify.html /usr/share/licenses/tor/LICENSE /usr/share/man/man1/tor-gencert.1.gz /usr/share/man/man1/tor-print-ed-signing-cert.1.gz /usr/share/man/man1/tor-resolve.1.gz /usr/share/man/man1/tor.1.gz /usr/share/man/man1/torify.1.gz /usr/share/tor/geoip /usr/share/tor/geoip6

Gostaria que desse uma olhada, não sei se pode ser isso, mas custa nada checar kk, porque eu não consegui nada kk;

Impersonateu commented 4 years ago

Don't give the status command right after starting nipe....Give it some time to establish a connection to the tor network

sv0 commented 4 years ago

I experience this error as well.

There are two possible cases:

  1. Nipe is freshly installed using git clone and ./nipe.pl install. After that it starts with ./nipe.pl start and works as expected(for the first time only).

  2. When you already have nipe installed with required dependencies (tor, iptables) and you start nipe with ./nipe.pl start it can fail in some circumstances.

Case 1

./nipe.pl install command stops Tor system service in Install.pm

So when you run ./nipe.pl start just after that, Tor system service is stopped and new Tor process starts with custom config from .configs directory.

Case 2

You already have Nipe and dependencies installed.

So you usually run ./nipe.pl start to route all traffic through the Tor network. When you check if it works with ./nipe.pl status, the output is:

 ./nipe.pl status

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

It happens because Tor system service is already running and bound on port 9050. It was not stopped as in case with ./nipe install command.

And when you run ./nipe.pl start, Tor process with custom config fails to start.

As a result of that, traffic forwarded to ports 9051 and 9061(DNS via Tor) goes nowhere.

Currently I'm working on this issue and will provide the fixes as soon as possible.

htrgouvea commented 4 years ago

Hi @sv0,

I see that you are writing a lot of new and interesting code! I would like to remind you to follow the Style Guide we use on Nipe: https://heitorgouvea.me/projects/perl-style-guide

Also, if you want, you can open small PR by solving minor things, so we can keep everything up to date quickly... Hugs and thanks for the contribution!

se7en-x230 commented 4 years ago

I have the same issue on Arch 5.8.1-arch1-1 ... only warning I get is that perl is Version : 5.32.0-1 a newer than expected ...

It installs fine and I get the same error

Vignesh-N-0 commented 3 years ago

nipe is working ...can you try this ! . . First Modify The Argument value in (1) :

Then you can use this commend's : nano nipe.pl Then modify the argument in 1 :
sub main { my $argument = $ARGV[1]; Then save it : Then it we get a Error Like , its print only the same help comment /. /. / COMMAND FUNCTION install Install dependencies start Start routing stop Stop routing restart Restart the Nipe circuit status See status

Then you use the nano again to open nipe.pl then you change the argument in (0) save it again : you can see nipe is working ......

ajmandourah commented 3 years ago

I get it finally to work on Manjaro. There were 2 issues .

Please update the Readme file to include it in the installation guide. @htrgouvea

m7amad-nem commented 3 years ago

fixed. did the iptables -F command and it fixed

i tried it doesnt work

FireStormCreater commented 2 years ago

I tried everything above nothing works. as soon as i start nipe it's turns of my internet on every interface right away.

but what works for me is i stop the service with perl nipe.pl stop

and then instead of perl nipe.pl start

i use perl nipe.pl restart and it's start working

htrgouvea commented 1 year ago

Hi folks!

I just published a new version of Nipe, can you test it and tell me if it works now?

If it doesn't work, can you give me more information? Like the distribution they are using or any other information they find pertinent?

Thanks!

TheUnknownMystery commented 1 year ago

hey is there a solution to this issue? i tried everything a nothing seems to work.

distrubution: kali linux 2023.1

htrgouvea commented 4 months ago

Hey folks, Recently the Nipe has had many updates. Resolve some bugs that we managed to identify. Can we test again? Thanks.

Make-Ye commented 3 months ago

I have the same issue on my kal: Chain INPUT (policy ACCEPT) target prot opt source destination

Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination
ACCEPT all -- anywhere anywhere state ESTABLISHED ACCEPT all -- anywhere anywhere owner UID match debian-tor ACCEPT udp -- anywhere anywhere udp dpt:9061 ACCEPT tcp -- anywhere anywhere tcp dpt:9061 ACCEPT tcp -- anywhere 10.66.0.0/16
ACCEPT all -- anywhere 127.0.0.0/8
ACCEPT all -- anywhere 192.168.0.0/16
ACCEPT all -- anywhere 172.16.0.0/12
ACCEPT all -- anywhere 10.0.0.0/8
ACCEPT tcp -- anywhere anywhere
REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable REJECT icmp -- anywhere anywhere reject-with icmp-port-unreachable