How to expose VPS' crowdsec LAPI endpoint to Newt? #258

Closed
opened 2025-11-13 11:54:42 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @cristo357 on GitHub (Apr 23, 2025).

I want to expose VPS' /etc/crowdsec/config.yaml server listen_uri to the newt endpoint in order to connect my homelab to the Crowdsec's VPS' LAPI. So instead of having 127.0.0.1:8080 would be 100.89.xxx.xxx:8080 (for example).

So in my Homelab's /etc/crowdsec/local_api_credentials.yaml connect to 100.89.xxx.xxx:8080 and as well for the Homelab's /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml.

This will allow me to ask for ban actions to the VPS' Crowdsec's LAPI and BOTH SERVERS would ban the same IP. Moreover, the Homelab crowdsec would scan .log files locally and report anything to the VPS' Crowdsec's LAPI. Do I mean?

Just as a mention:

  • I manually installed Pangolin.
  • I manually installed crowdsec in both servers using apt-get, not the docker one.
  • I installed Newt in Homelab using Newt's Linux AMD64 installation systemd.
Originally created by @cristo357 on GitHub (Apr 23, 2025). I want to expose VPS' `/etc/crowdsec/config.yaml` server `listen_uri` to the newt endpoint in order to connect my homelab to the Crowdsec's VPS' LAPI. So instead of having `127.0.0.1:8080` would be `100.89.xxx.xxx:8080` (for example). So in my Homelab's `/etc/crowdsec/local_api_credentials.yaml` connect to `100.89.xxx.xxx:8080` and as well for the Homelab's `/etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml`. This will allow me to ask for ban actions to the VPS' Crowdsec's LAPI and BOTH SERVERS would ban the same IP. Moreover, the Homelab crowdsec would scan .log files locally and report anything to the VPS' Crowdsec's LAPI. Do I mean? Just as a mention: - I manually installed Pangolin. - I manually installed crowdsec in both servers using apt-get, not the docker one. - I installed Newt in Homelab using Newt's Linux AMD64 installation systemd.
Author
Owner

@oschwartz10612 commented on GitHub (Apr 23, 2025):

Hi! This is a super interesting request. I have never thought of something like this.

Right now unfortunately there is not really a way to send data back up into Newt and then to the VPS because Newt is running a fully user space network stack and reverse proxying out traffic to your local network.

You may be able to experiment with using a raw WireGuard tunnel to do this but I dont know if it is worth it for the reduced simplicity.

I am going to close this as not planned right now but if you are still interested in doing something like this with newt you are welcome to open a discussion on the discussion board and if people are interested we might approach something like this.

@oschwartz10612 commented on GitHub (Apr 23, 2025): Hi! This is a super interesting request. I have never thought of something like this. Right now unfortunately there is not really a way to send data back up into Newt and then to the VPS because Newt is running a fully user space network stack and reverse proxying out traffic to your local network. You may be able to experiment with using a raw WireGuard tunnel to do this but I dont know if it is worth it for the reduced simplicity. I am going to close this as not planned right now but if you are still interested in doing something like this with newt you are welcome to open a discussion on the discussion board and if people are interested we might approach something like this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#258