Skip to content

Restrict access to custom repository

Hello guys.

Right now at home I'm hosting a custom package repository for Archlinux in which I build packages from AUR and some custom packages that I use regularly.

My setup

I'm using a Swag container to serve the packages, Cloudflare as my DNS provider and a container with aurutils to build my packages.

The situation

Right now my custom repository is accessible from the internet (which is something I want) and people with the URL of the repository can use it.

Scope

What I would like to achieve is to restrict the access to my custom repository pretty much like SSH key autentication when remoting inside a machine. I don't want random people to begin using my repository, but only a few, even if they have the URL.

Possible solutions

VPN and Virtual interface

Right now the only idea I have in mind is making the repository accessible only through a VPN, and setup a virtual interface on my machine to the VPN so that I don't get those annoying messages saying that the download of the database has failed.

XferCommand

https://bbs.archlinux.org/viewtopic.php?id=237687

SSHFS

Not my favourite

Any suggestion about how you would achieve this?

Solution

As one of the commenters suggested, I think I will go for HTTP basic authentication which seems to be what I was looking for.

https://bbs.archlinux.org/viewtopic.php?id=275915

Edited 8 Jun 2022. We only hold this version.

44 points7 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
44 · 96% up
Kind
Text
ID
v7lytk

Author

11
posts
23
comments
0
media
View profile

7 comments

Put the repo behind Tailscale and remove it from the public Internet

3 points

thanks for letting me discover this service, seems pretty interesting.

I've looked into it and it seems pretty much like using a VPN to allow the use of the repository, is that right?

1 points

It's the same concept just far easier / less annoying to set up. Effectively you can imagine that every computer you own has a 2nd network adapter that are all connected to the same network switch, no matter where in the world they are. This means you can run services that don't have any publicly open ports to the Internet, which vastly reduces your attack surface

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.