Reformat
This commit is contained in:
parent
9d7060f531
commit
e0651eea6c
@ -9,8 +9,10 @@ visible: false
|
||||
|
||||
### Network and Pod
|
||||
|
||||
`# podman network create net_authentik`
|
||||
`# podman pod create --name pod_authentik --network net_authentik -p `
|
||||
```sh
|
||||
podman network create net_authentik
|
||||
podman pod create --name pod_authentik --network net_authentik -p
|
||||
```
|
||||
|
||||
#### Port Mappings
|
||||
|
||||
@ -21,7 +23,7 @@ visible: false
|
||||
### Database
|
||||
|
||||
```sh
|
||||
# podman run --name authentik_db \
|
||||
podman run --name authentik_db \
|
||||
-e PGDATA=/var/lib/postgresql/data/pgdata \
|
||||
-e POSTGRES_USER=authentik \
|
||||
-e POSTGRES_PASSWORD=authentik \
|
||||
@ -34,7 +36,7 @@ visible: false
|
||||
### Redis
|
||||
|
||||
```sh
|
||||
# podman run --name authentik_redis \
|
||||
podman run --name authentik_redis \
|
||||
-v /mnt/authentik_redis:/data \
|
||||
--pod pod_authentik \
|
||||
-d docker.io/redis:7 \
|
||||
@ -45,7 +47,7 @@ visible: false
|
||||
|
||||
https://goauthentik.io/docs/installation/docker-compose
|
||||
|
||||
```
|
||||
```yaml
|
||||
server:
|
||||
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.9.0}
|
||||
restart: unless-stopped
|
||||
@ -74,7 +76,7 @@ https://goauthentik.io/docs/installation/docker-compose
|
||||
|
||||
### Application Worker
|
||||
|
||||
```
|
||||
```yaml
|
||||
worker:
|
||||
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.9.0}
|
||||
restart: unless-stopped
|
||||
|
@ -11,7 +11,9 @@ The VM template needs a few cloud-init tools installed before we can use it with
|
||||
|
||||
### Debian
|
||||
|
||||
`# apt install cloud-init cloud-initramfs-growroot`
|
||||
```sh
|
||||
apt install cloud-init cloud-initramfs-growroot
|
||||
```
|
||||
|
||||
### AlmaLinux
|
||||
|
||||
|
@ -7,53 +7,71 @@ visible: true
|
||||
|
||||
## Installation
|
||||
|
||||
`# apt install isc-dhcp-server`
|
||||
```sh
|
||||
apt install isc-dhcp-server
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Edit `/etc/default/isc-dhcp-server`
|
||||
`INTERFACESv4="(interface 1) (interface 2)"`
|
||||
|
||||
```
|
||||
INTERFACESv4="{INTERFACE 1} {INTERFACE 2}"
|
||||
```
|
||||
|
||||
Edit `/etc/dhcp/dhcpd.conf` to set a subnet
|
||||
|
||||
```
|
||||
subnet (netaddress) netmask (subnetmask) {
|
||||
range (first dhcp) (last dhcp);
|
||||
option subnet-mask (subnetmask);
|
||||
option routers (gateway);
|
||||
option domain-name "(name)";
|
||||
option domain-name-servers (dns server);
|
||||
subnet {NETADDRESS} netmask {SUBNETMASK} {
|
||||
range {FIRST DHCP} {LAST DHCP};
|
||||
option subnet-mask {SUBNETMASK};
|
||||
option routers {GATEWAY};
|
||||
option domain-name "{NAME}";
|
||||
option domain-name-servers {DNS SERVER};
|
||||
}
|
||||
```
|
||||
|
||||
Edit `/etc/network/interfaces`
|
||||
|
||||
```
|
||||
auto (interface)
|
||||
iface (interface) inet static
|
||||
address (address)
|
||||
network (netaddress)
|
||||
netmask (netmask)
|
||||
broadcast (broadcast)
|
||||
auto {INTERFACE}
|
||||
iface {INTERFACE} inet static
|
||||
address {ADDRESS}
|
||||
network {NETADDRESS}
|
||||
netmask {NETMASK}
|
||||
broadcast {BROADCAST}
|
||||
```
|
||||
|
||||
Enable the interface
|
||||
`# ifup (interface)`
|
||||
|
||||
```sh
|
||||
ifup {INTERFACE}
|
||||
```
|
||||
|
||||
Restart DHCP Server
|
||||
`# systemctl restart isc-dhcp-server.service`
|
||||
|
||||
```sh
|
||||
systemctl restart isc-dhcp-server.service
|
||||
```
|
||||
|
||||
### Enable routing
|
||||
|
||||
`# echo "net.ipv4.ip_forward=1" >> /etc/sysctl.d/80-forwarding.conf`
|
||||
`# sysctl -p /etc/sysctl.d/80-forwarding.conf`
|
||||
```sh
|
||||
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.d/80-forwarding.conf
|
||||
sysctl -p /etc/sysctl.d/80-forwarding.conf
|
||||
```
|
||||
|
||||
`# iptables -t nat -A POSTROUTING -o (WAN interface) -j MASQUERADE`
|
||||
`# iptables -A FORWARD -i (LAN interface) -j ACCEPT`
|
||||
```sh
|
||||
iptables -t nat -A POSTROUTING -o (WAN interface) -j MASQUERADE
|
||||
iptables -A FORWARD -i (LAN interface) -j ACCEPT
|
||||
```
|
||||
|
||||
Make iptables permanent
|
||||
Select `Yes` during the installation to save current rules
|
||||
`# apt install iptables-persistent`
|
||||
|
||||
```sh
|
||||
apt install iptables-persistent
|
||||
```
|
||||
|
||||
### Enable DHCP-managed fixed IP address
|
||||
|
||||
@ -98,7 +116,13 @@ zone 7.168.192.in-addr.arpa. {
|
||||
## Client
|
||||
|
||||
DHCP Request
|
||||
`# dhclient -v`
|
||||
|
||||
```sh
|
||||
dhclient -v
|
||||
```
|
||||
|
||||
Release IP
|
||||
`# dhclient -v -r`
|
||||
|
||||
```sh
|
||||
# dhclient -v -r
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user