[add] support files
This commit is contained in:
parent
7c5c0b242e
commit
075b9fca9e
4 changed files with 87 additions and 20 deletions
|
|
@ -1,3 +1,42 @@
|
|||
# Pi Hole
|
||||
|
||||
Text
|
||||
## Create docker network
|
||||
```
|
||||
docker network create -d macvlan \
|
||||
--subnet=192.168.1.10/24 --gateway=192.168.1.1 \
|
||||
--ip-range 192.168.1.59/28 \
|
||||
-o parent=eth0 \
|
||||
--aux-address="myserver=192.168.1.60" \
|
||||
macvlan0
|
||||
```
|
||||
then
|
||||
|
||||
1. sudo ip link set eth0 promisc on
|
||||
1. sudo ip link add macvlan-shim link eth0 type macvlan mode bridge
|
||||
1. sudo ip addr add 192.168.1.60/28 dev macvlan-shim
|
||||
1. sudo ip link set macvlan-shim up
|
||||
|
||||
Check
|
||||
ifconfig macvlan-shim
|
||||
|
||||
## /usr/local/bin/pi-vlan.sh
|
||||
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
ip link add macvlan-shim link eth0 type macvlan mode bridge
|
||||
ip addr add 192.168.1.60/28 dev macvlan-shim
|
||||
ip link set macvlan-shim up
|
||||
ifconfig macvlan-shim
|
||||
```
|
||||
## /etc/systemd/system/pi-vlan.service
|
||||
|
||||
```
|
||||
[Unit]
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/pi-vlan.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue