Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
There’s not a lot of information to go on here, but my first thought is that you haven’t configured your VPN to route to the local network. So, while you may be getting a connection to the VPN server, your computer doesn’t know where to send traffic for Cockpit.
There is usually a way to push those routes to the client from your con server.
Hi! I've done a bit more thorough googling, because of you I knew what to look for a bit better. I have a wireguard vpn on my fritz box router enabled, which allows me to connect to the vpn from my laptop.
I've read up on how to acces local devices and I found something about adding an IP to the "AllowedIPs" section, but I don't really get which IP I should add.
This would tell the peer with this configuration to send all traffic for the whole 192.168.1.0/24 through the tunnel, not sure that is what OP wants. (Didn't look at the link though)
The best thing would be if I can just type the local IP of my server in the browser and just get routed to my server when I have the VPN enabled
Then you would need to put that, and only that IP in the allowed IP section.
I've tried this, but it didn't work. At home, I can access my cockpit server by typing the machines IP and port 8080. When I try this on the VPN though, it doesn't work. I can access my routers settings, but not the server.
Can you post your config of the client? Remember to redact sensible information.
Here is my config file (I redacted the keys and changed up IP's just to be safe):
Two things:
192.135.163.0 is not a private IP... the private range would be 192.168.0.0/16. I guess that's because you changed the IPs bit maybe better check that
And 0.0.0.0/0 means "all IPs" so it doesn't really make sense to put the other one there.
Other than that I don't see anything wrong...
yeah tje 192.135.163.0 is changed, originally it was 192.168.0.1/24 iirc. Weird that there isn't anything wrong, because when.I use the internal IP of the cockpit machine with the port the cockpit instance is on, it doesn't show anything. Thanks for the help tho!
While not what OP wants, this is what I want, but it isn't working for me. I am trying expose a subnet behind nat, to a public server. I am currently testing this by attempting to expose the vlan created by libvirt on my laptop to my public vps. I followed the linked point to site guide, and ironically, the virtual machines created on my laptop can access the wireguard subnet, but public vps cannot access the virtual machines? (the guide said that it would be the opposite without the iptables nat/masquerade rules) I am guessing because I am doing this somewhat backwards, where the device exposing the lan is behind nat, whereas it is the other way around in the guides that I have seen.
The folks replying here have pretty much hit the nail on the head. Adding your home network to that AllowedIPs line in the confit file should do the trick.
Someone else mentioned Tailscale, which would be another great option—with a web UI to dial in routes.