I’ll use 192.168.0.2 as the local IP of the Pi in this post. Requests sent to your router on that port will be forwarded to the Pi. Each router will be different, but the goal is to create an entry to forward a port (let’s say 8888) to your Raspberry Pi port 22 (the default SSH port). So, we need to tell our router to send traffic on some port to the Pi. We’ll want to access our Raspberry Pi from outside our local network. This may be more risk than you’re willing to take and you should evaluate if you would rather pay someone else (e.g. This step exposes your Pi to the internet. You’ll need this when creating the tunnel later. Then restart the squid service: sudo service squid restartīy default, squid listens on port 3128. Replace the IP address block with your local IP address block. This allows access to the proxy from your localnet. Then edit /etc/squid/nf to have the following two lines: acl localnet src 192.168.86.0/24 Make a backup first just in case: sudo cp /etc/squid/nf /etc/squid/
Route vnc through ssh install#
Install it with: sudo apt-get install squid3 I haven’t tried this, but do a dynamic port forward rather than a direct one. If you only want to use this as a SOCKS proxy, you can skip this step and not need any other software on the Pi. The proxy will act as… the proxy running on the Pi. You could also do all of this on any network connected server, not just a Raspberry Pi. You may have to modify some instructions depending on your package manager, environment, etc. Restart SSH with sudo service ssh restart.Disable password auth by editing /etc/ssh/sshd_config and adding (or uncommenting) a PasswordAuthentication no line.You’ve probably already done this if you ran the updates and configuration above.
Route vnc through ssh how to#
See for how to enable SSH (if you’re running headless, you might need to add an ssh file directly to the SD card with another computer, see the bottom of that page).Since we’ll be exposing the Pi to the internet, I set up SSH keys and disabled password access. sudo apt-get update & sudo apt-get upgrade).īe sure to change your password ( raspi-config or passwd).
Set up your Raspberry PiĪt a high level, you’ll need to flash an SD card, plug it in, set up your network, install updates (e.g.
These instructions are somewhat minimal and assume you’ve worked with a Raspberry Pi and SSH in the past.
If you require privacy or security, I recommend following a different post. This post details how I set up my Raspberry Pi as an HTTP proxy through an SSH tunnel.ĭisclaimer: I’m not an expert in privacy, security, networking, or anything else in this post… Proceed at your own risk. Free HTTP Proxy with a Raspberry Pi, an SSH Tunnel, and Dynamic DNS