GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    clacke (clacke@libranet.de)'s status on Tuesday, 04-Feb-2025 11:44:48 JST clacke clacke

    Anyone with Ansible/AWX experience accessing HTTP APIs on protected networks?

    I have tried documentation, the global web and chat with colleagues. Time to bring on the fedi human search.

    Using ansible on switches that require you to come from a protected network is easy, you set up your ssh command to go through a jumphost. Accessing switches or firewalls that use an HTTP API is easy, you use a package that talks to the HTTP API, probably using the httpapi package.

    But an HTTP API where you need to come from a protected network? Manually it's easy, just `ssh -D` to a jumphost/bastion in the right network and tell curl to use a SOCKS proxy.

    On the Ansible side though, I can't find the right place to get httpapi to go through a SOCKS proxy, and I'm not sure where's the best place to run that ssh command.

    Has anyone on Fedi already solved this problem?

    #Ansible #AnsibleTower #AWX

    In conversation about 4 months ago from libranet.de permalink
    • Embed this notice
      Fish of Rage (sun@shitposter.world)'s status on Tuesday, 04-Feb-2025 11:44:46 JST Fish of Rage Fish of Rage
      in reply to
      @clacke I think you just set http_proxy to your http proxy url in your environment block? Not sure, it's been several years
      In conversation about 4 months ago permalink
    • Embed this notice
      Fish of Rage (sun@shitposter.world)'s status on Tuesday, 04-Feb-2025 11:45:09 JST Fish of Rage Fish of Rage
      in reply to
      • Fish of Rage
      @clacke oh shoot, socks, I don't know, maybe if the uri is socks5:// but I haven't done it before
      In conversation about 4 months ago permalink
      clacke likes this.
    • Embed this notice
      Fish of Rage (sun@shitposter.world)'s status on Tuesday, 04-Feb-2025 11:53:18 JST Fish of Rage Fish of Rage
      in reply to
      @clacke I wonder if you can even do that on Tower. I don't know, I am sorrty.
      In conversation about 4 months ago permalink
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Tuesday, 04-Feb-2025 11:53:20 JST clacke clacke
      in reply to
      • Fish of Rage

      @sun Hmm, maybe that's worth trying.

      What's a good Ansibl-y way to:
      1. Start the ssh client
      2. Run the HTTP API task
      3. Stop the ssh client

      In conversation about 4 months ago permalink
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Tuesday, 04-Feb-2025 17:54:54 JST clacke clacke
      in reply to
      • Bonkers

      @bonkers I didn't even consider that it might accept a socks URL in the normal http proxy setting, but it's certainly worth trying, and probably works!

      Then the question just remains how to wrap this in some context where the ssh client is running.

      In conversation about 4 months ago permalink
    • Embed this notice
      Bonkers (bonkers@nerdculture.de)'s status on Tuesday, 04-Feb-2025 17:54:55 JST Bonkers Bonkers
      in reply to

      @clacke I'd try this

      https://linuxtutorials.org/socks5-proxy-environment-variable-linux/

      In conversation about 4 months ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        how to set socks5 proxy environment variable in linux
        Set socks5 proxy environment variable(local dns) export http_proxy=socks5://PROXYSERVER:PORT dns will be resolved by local DNS server Set socks5 proxy environment variable(remote dns) export http_proxy=socks5h://PROXYSERVER:PORT Dns will be resolved by proxy side dns server Save configuration For your own use only , put one of above commands into your ~/.bashrc file .bashrc Save it system wide , put below line http_proxy=socks5h://PROXYSERVER:PORT into file /etc/environment
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Tuesday, 04-Feb-2025 19:45:12 JST clacke clacke
      in reply to
      • Bonkers
      @bonkers Yeah, there's an environment block: shitposter.world/objects/44fea…
      In conversation about 4 months ago permalink
    • Embed this notice
      Bonkers (bonkers@nerdculture.de)'s status on Tuesday, 04-Feb-2025 19:45:13 JST Bonkers Bonkers
      in reply to

      @clacke I think you can set the remote variable in Ansible job definition. But I'm not that deep in it. I only did basic automation with direct ssh access to the remote side.

      In conversation about 4 months ago permalink
    • Embed this notice
      Bonkers (bonkers@nerdculture.de)'s status on Tuesday, 04-Feb-2025 19:45:53 JST Bonkers Bonkers
      in reply to

      @clacke LOL, nice domain name over there

      In conversation about 4 months ago permalink
      clacke likes this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.