Setup wireguard on altra

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-07-27 20:58:53 +02:00
parent 3aa375c48e
commit 262a2fba32
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 27 additions and 26 deletions

View file

@ -1498,8 +1498,8 @@
"secret": { "secret": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1689723668, "lastModified": 1690482869,
"narHash": "sha256-o+sV0G+Hc3pgw6Es12ki2WpDdE0KpKVKdgqdjnVAb+4=", "narHash": "sha256-in5I/oRcup7cZtR4lMTSiw8m5eDBFrk31AkTNdTlN3s=",
"path": "/home/main/dotfiles2/secret", "path": "/home/main/dotfiles2/secret",
"type": "path" "type": "path"
}, },

View file

@ -25,41 +25,42 @@ in
# "67.207.67.3" # "67.207.67.3"
# ]; # ];
# wireguard = { wireguard = {
# enable = true; enable = true;
# interfaces."wg0" = interfaces."wg0" =
# { {
# postSetup = '' postSetup = ''
# ${getExe pkgs.iptables} -I FORWARD -i wg0 -o wg0 -j ACCEPT ${getExe pkgs.iptables} -I FORWARD -i wg0 -o wg0 -j ACCEPT
# ''; '';
# postShutdown = '' postShutdown = ''
# ${getExe pkgs.iptables} -D FORWARD -i wg0 -o wg0 -j ACCEPT ${getExe pkgs.iptables} -D FORWARD -i wg0 -o wg0 -j ACCEPT
# ''; '';
# } }
# // secret.wireguard."toothpick" or { privateKey = ""; }; // secret.wireguard."altra" or { privateKey = ""; };
# }; };
# defaultGateway = "64.225.96.1"; # defaultGateway = "64.225.96.1";
# defaultGateway6 = ""; # defaultGateway6 = "";
# dhcpcd.enable = false; # dhcpcd.enable = false;
# usePredictableInterfaceNames = lib.mkForce false; # usePredictableInterfaceNames = lib.mkForce false;
# firewall = { firewall = {
# extraCommands = '' extraCommands = ''
# iptables -P FORWARD DROP iptables -P FORWARD DROP
# ''; iptables -t nat -I PREROUTING -i eth0 -d 167.235.230.162/32 -p udp -m multiport --dports 500 -j REDIRECT --to-ports 6666
'';
# interfaces."eth0" = { interfaces."eth0" = {
# allowedTCPPorts = [ # allowedTCPPorts = [
# 80 # 80
# 443 # 443
# 6001 # 6001
# ]; # ];
# allowedUDPPorts = [ allowedUDPPorts = [
# 6666 6666
# ]; ];
# }; };
# interfaces."nomad" = { # interfaces."nomad" = {
# allowedTCPPorts = [ # allowedTCPPorts = [
@ -99,8 +100,8 @@ in
# to = 21255; # to = 21255;
# } # }
# ]; # ];
# }; };
# }; };
# interfaces = { # interfaces = {
# eth0 = { # eth0 = {