[HOME] [DOWNLOAD] [DOCS] [NEWS] [SUPPORT] [TIPS] [ISSUES] [DONATE]

how to host a golang app on Whonix using Golang web server ?

I want to host a Golang web app and I want to host it using Golang webserver (I don’t want use NGINX or Apache along with go for performance purposes) .

I exactly followed the guide provided on /wiki/Onion_Services (I only changed port from 80 to 8081 because it’s where my server is running) ,

The service is available on 127.0.0.1:8081 , but when I check if the service is available on 10.152.152.11:8081 , I get this error :
curl : (7) : failed to connect to 10.152.152.11 port 8081:connection refused .
Notes :
-The .onion address generated isn’t accessible .
-I am a non-Qubes whonix newbie user .
-My /usr/local/etc/torrc.d/50_user.conf file looks like this :

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 8081 10.152.152.11:8081
HiddenServiceVersion 3 

-my ‘/etc/whonix_firewall.d/50_user.conf’ file looks like this :

EXTERNAL_OPEN_PORTS+=" 8081 "

How can I solve this problem ?

Thanks a lot .

Application needs to listen on 10.152.152.11:8081. Before that is working, everything else does not matter.

Either

  • Reconfigure application to listen on 10.152.152.11:8081.
  • Or use something like bindp (installed by default in Whonix, undocumented).

Hi Patrick ,
I reconfigured my app to 10.152.152.11:8081 , but this makes the service unavailable on 127.0.0.1:8081 , is that Okey ?

I don’t see why not.

It’s fixed :smiley: .
Thanks Patrick we do appreciate what you are all doing to make the internet a privat/better place .
:heart::heart::heart::heart:

1 Like
[Imprint] [Privacy Policy] [Cookie Policy] [Terms of Use] [E-Sign Consent] [DMCA] [Investors] [Priority Support] [Professional Support]