Jump to: navigation, search

Dev/Port Redirection

< Dev

Install lighttpd.

sudo apt-get install lighttpd

It will by default listen on all interfaces. Check if that is true. Change IP to for Non-Qubes-Whonix.


Now make it listen on localhost only.

echo 'server.bind = ""' | sudo tee -a /etc/lighttpd/lighttpd.conf
sudo service lighttpd restart

Should no longer be reachable. Try if that is true.


Now try to set up a redirection from to

sudo sysctl -w net.ipv4.conf.all.route_localnet=1
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --to
#sudo iptables -t nat -I PREROUTING -p tcp --dport 17600:17650 -j DNAT --to

#sudo iptables -t nat -A PREROUTING  -p tcp --dport 80 -j REDIRECT --to-port 80
#sudo iptables -t nat -A PREROUTING  -p tcp --dport 17600 -j REDIRECT --to-port 17600

See if that works now.


If not, unload firewall rules and try something else.

Random News:

Please consider a recurring donation!

Impressum | Datenschutz | Haftungsausschluss

https | (forcing) onion
Share: Twitter | Facebook | Google+
This is a wiki. Want to improve this page? Help welcome, volunteer contributions are happily considered! See Conditions for Contributions to Whonix, then Edit! IP addresses are scrubbed, but editing over Tor is recommended. Edits are held for moderation. Whonix (g+) is a licensee of the Open Invention Network. Unless otherwise noted above, content of this page is copyrighted and licensed under the same Free (as in speech) license as Whonix itself.