A ruby script to generate the boilerplate for a dual-stack VyOS zone based firewall.
Zones:
- PRIVATE: contains the LAN and WAN modem admin interface
- PUBLIC: The Internet - contains the PPPoE interface
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <[email protected]>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
import asyncio | |
import websockets | |
import json | |
import pickle | |
import sys | |
import multiprocessing | |
import random | |
import time | |
from collections import deque |
{ config, pkgs, ... }: | |
let | |
# Import unstable channel. | |
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable | |
# sudo nix-channel --update nixpkgs-unstable | |
unstable = import <nixpkgs-unstable> {}; | |
in | |
{ |
git clone [email protected]:Robertof/nixos-docker-sd-image-builder.git
cd nixos-docker-sd-image-builder
/config/rpi4/default.nix
to increase size of boot partition
sdImage.firmwareSize = 1024;
/config/sd-image.nix
./rpi3
becomes ./rpi4
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |