mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +01:00
Setup wireguard on altra
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
3aa375c48e
commit
262a2fba32
|
@ -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"
|
||||||
},
|
},
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
Loading…
Reference in a new issue