Cleaning up directions on container starts

This commit is contained in:
John Dorman
2020-06-14 08:47:56 -07:00
parent 3344c21355
commit 1c62e87544
7 changed files with 14 additions and 10 deletions

View File

@ -50,3 +50,4 @@ If you have already installed PiHole, skip right to step 6.
``` ```
Note: Note:
8. Update your DNS Servers to 10.0.5.3 (or your custom ip) in all your DHCP configs. 8. Update your DNS Servers to 10.0.5.3 (or your custom ip) in all your DHCP configs.
9. Uncomment ```podman start nextdns``` in on_boot.sh

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd /tmp curl -L https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-arm64-v0.8.6.tgz -o /tmp/cni.tgz
curl -L https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-arm64-v0.8.6.tgz -o cni.tgz
mkdir -p /mnt/data/podman/cni/ mkdir -p /mnt/data/podman/cni/
tar xf cni.tgz -C /mnt/data/podman/cni/ tar xf /tmp/cni.tgz -C /mnt/data/podman/cni/
rm /tmp/cni.tgz

View File

@ -12,7 +12,8 @@ ip link set br5.mac promisc on
ip addr add 10.0.5.2/24 dev br5.mac ip addr add 10.0.5.2/24 dev br5.mac
ip link set br5.mac up ip link set br5.mac up
ip route add 10.0.5.3/32 dev br5.mac proto static scope link ip route add 10.0.5.3/32 dev br5.mac proto static scope link
podman start nextdns # Remove the # on the line below when Docker container is deployed.
#podman start nextdns
# optional if you dont want to force everything through nextdns. also add anymore bridges for other networks (br5, 10 etc) # optional if you dont want to force everything through nextdns. also add anymore bridges for other networks (br5, 10 etc)
iptables -t nat -C PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3 || iptables -t nat -A PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3 iptables -t nat -C PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3 || iptables -t nat -A PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3

View File

@ -1,3 +1,5 @@
#!/bin/sh #!/bin/sh
## example command to run, please replace with your own.
podman start wpa_supplicant-udmpro podman start wpa_supplicant-udmpro

View File

@ -46,3 +46,4 @@ podman exec -it pihole pihole -a -p YOURNEWPASSHERE
``` ```
8. Update your DNS Servers to 10.0.5.3 (or your custom ip) in all your DHCP configs. 8. Update your DNS Servers to 10.0.5.3 (or your custom ip) in all your DHCP configs.
9. Access the pihole like you would normally. 9. Access the pihole like you would normally.
9. Uncomment ```podman start pihole``` in on_boot.sh

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd /tmp curl -L https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-arm64-v0.8.6.tgz -o /tmp/cni.tgz
curl -L https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-arm64-v0.8.6.tgz -o cni.tgz
mkdir -p /mnt/data/podman/cni/ mkdir -p /mnt/data/podman/cni/
tar xf cni.tgz -C /mnt/data/podman/cni/ tar xf /tmp/cni.tgz -C /mnt/data/podman/cni/
rm /tmp/cni.tgz

View File

@ -13,7 +13,8 @@ ip link set br5.mac promisc on
ip addr add 10.0.5.2/24 dev br5.mac ip addr add 10.0.5.2/24 dev br5.mac
ip link set br5.mac up ip link set br5.mac up
ip route add 10.0.5.3/32 dev br5.mac proto static scope link ip route add 10.0.5.3/32 dev br5.mac proto static scope link
podman start pihole # Remove the # on the line below when Docker container is deployed.
#podman start pihole
#Adjust these rules to your setup and interfaces #Adjust these rules to your setup and interfaces
iptables -t nat -C PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3 || iptables -t nat -A PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3 iptables -t nat -C PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3 || iptables -t nat -A PREROUTING -i br0 -p udp ! --source 10.0.5.3 ! --destination 10.0.5.3 --dport 53 -j DNAT --to 10.0.5.3