Connecting to localhost through tor browser in Tails

Hi all,

I’m attempting to connect to 127.0.0.1:8000 through tor browser.

I’m using tails OS version 4.29 (64 bit), with tor browser version 91.8.0esr (64 bit).

steps i’ve followed:

$ python2 -m SimpleHTTPServer 8000

$ sudo iptables -I OUTPUT -d localhost -o lo -p tcp --dport 8000 -m owner --uid-owner amnesia -j ACCEPT;

start tor browser and go to about:config and set network. proxy. no_proxies_on to 127.0.0.1:8000

when i go to 127.0.0.1:8000 in the browser, I get “Unable to connect. Firefox can’t establish a connection to the server at 127.0.0.1:8000.”

however, when I do

$ curl 127.0.0.1:8000

it works just fine.

I’m super confused why this doesn’t work since the no_proxy_on option should let me do this right? Thank you all!