phasing in celery
for configuring the vpn server
This commit is contained in:
parent
aec79cba74
commit
2d62388eb1
8 changed files with 160 additions and 80 deletions
|
|
@ -13,6 +13,16 @@ class WireGuardVPNPool(models.Model):
|
|||
Network address pools from which VPNs can be created
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['wg_name', 'vpn_server_hostname' ],
|
||||
name='unique_interface_name_per_host')
|
||||
]
|
||||
|
||||
|
||||
# Linux interface naming is restricing to max 15 characters
|
||||
wg_name = models.CharField(max_length=15)
|
||||
|
||||
network = models.GenericIPAddressField(unique=True)
|
||||
network_mask = models.IntegerField(validators=[MinValueValidator(0),
|
||||
MaxValueValidator(128)])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue