this post was submitted on 25 Dec 2024
30 points (96.9% liked)

Selfhosted

40731 readers
505 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I'm looking to try some hands-on experience setting up proxies. However, the proxy I want to setup is a bit unique. My end goal is to be able to do the following:

  • Connect a Raspberry Pi to a network using Ethernet or Wi-Fi
  • Automatically have the Raspberry Pi (as soon as it is powered on and connected) send its own public IP address (and other relevant proxy information, where applicable) to a home server (and periodically retry sending this information if the server is down)
  • Be able to proxy my connection from a separate network through the Raspberry Pi (by simply entering in the IP address and port as a normal proxy) so that my public IP address will now show up as that of the network the Raspberry Pi is connected to

I want to avoid configuring port forwarding for networks the Raspberry Pi is connected to. I can configure port forwarding for the network my home server is connected to, but if possible I would like to avoid that as well (for convenience and security).

I also want to avoid using a third party service (e.g. Linode) to manage the proxy for me. I want the Raspberry Pi to do all the work here, ideally using open source software such as Privoxy or Squid. I want this to be an HTTP proxy. If possible, I would like to encrypt the proxy connection.

I'm not sure if any of this would be possible without port forwarding. Maybe some sort of reverse proxy would help with this. I understand how a proxy such as this could have the potential for misuse, as do most things. I'm making this post for educational purposes only, so that I can better my understanding of proxies and network security.

Any guides or videos on how to set this up are greatly appreciated. I found a few, but none quite capture what I'm describing here. Most don't talk about using this across separate networks, only local networks.

Thank you!

you are viewing a single comment's thread
view the rest of the comments
[–] shadejinx@lemmy.world 9 points 17 hours ago (1 children)

The answer is an SSH reverse tunnel. Have privoxy running in the rPi listening on localhost. Have it then connect to your home server via SSH with reverse tunnels enabled, tunneling the privoxy port. On your home server you run another instance of Privoxy that’s listening in your home network and proxy forwarding over the tunnel and you’re done.

I used to use this setup for pen testing.

[–] psmgx@lemmy.world 4 points 16 hours ago (1 children)

I used to use this setup for pen testing

Used to. Why no longer?

[–] shadejinx@lemmy.world 5 points 15 hours ago

I don't do that for a living anymore