Last active
August 29, 2015 13:56
-
-
Save rettal/9007394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, protect the web interface port so that it cannot be accessed from the outside world. | |
You can use iptables to block the port as follows: | |
sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP | |
sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT | |
Note: You may have to replace eth0 and 8080 above if you are using another interface. | |
SOCKS proxy setup | |
Once you block the web interface port, the easiest way to access it is to use ssh to set up a socks proxy. | |
Run the following command on your local machine (not the one running the web interface): | |
ssh -D 3000 USERNAME@HOST | |
Where, | |
HOST is the ip of your the web interface. | |
3000 can be changed to any port that is available on your local machine. | |
Then open your browser: | |
If you're using Chrome, go to Settings > Advanced settings > Network > Change proxy settings, | |
and set the Network proxy option to manual mode with the following settings: | |
Host: localhost | |
Port: 3000 | |
Ignored host: (remove everything) | |
If you are using Firefox, go to Edit > Preferences. | |
Then click on Advanced > Network > Settings and create a manual proxy configuration with these settings: | |
Socks host: localhost | |
Port: 3000 | |
Check socks v5 | |
No proxy for: (remove everything) | |
You can now visit localhost:8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment