I’ve developed a Python application which rotates VPN gateways from one or more providers. This will change your outbound IP address, and optionally VPN provider(s), on a random basis within a given time period (eg, every 2-4 hours). This uses Docker, the Gluetun VPN client, virtual machines, and optionally HAProxy, MQTT, InfluxDB and Unbound DNS.

I’d really appreciate feedback from members of this subreddit, whether that’s in regards to the general concept, the example architecture I’ve included in the repo (below), the code itself, or whatever else you might have!

Randomizer supports all providers supported by the Gluetun VPN client including custom providers. The randomizer project has been biased towards Wireguard and Linux, with OpenVPN and other OSes in near-term consideration. It’s my intention to keep the project as flexible as possible allowing ease in adopting personal modifications.

https://github.com/ingestbot/randomizer

  • ajicles@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Could probably do this easier with PFsense and setup all of the VPN clients on the firewall and write a script to stop and start each vpn service. I use PFsense for torrents to allow load balancing and to increase throughput. I have three openvpn clients setup into a gateway group and tunnel the traffic out.

    • nocsupport@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      pfSense can just keep all the VPN sessions up. You make gateway groups that can be triggered by timers. "At 12:37 these clients should use this gw group which favors this VPN "

    • ingestbot@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Supporting appliance based tunnels would probably be a clear path for this project. Challenges may involve key handling and gateway/provider management. If there were a dependable, native API this could make it all the easier.

      My little project so far has been biased towards (a surplus of) redundant commodity hardware. The environment where this evolved includes a very early MIPS32 based router so tunneling/proxying/resolving were not an option there.

      I’m most definitely inspired here to see about supporting this kind of configuration! pfsense/opnsense have been on my list for years.