Skip to content

Commit e01c296

Browse files
committed
feat(wg): add vpn sessions
1 parent b0e7f70 commit e01c296

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
home-manager/hspecter/*-vpn
22
home-manager/hspecter/result
33
home-manager/swheeler/appart.secrets.nix
4-
hspecter/wg*
54
hspecter/smb-secrets
65
result*
76
**/dn42/peers/tunnels.nix
@@ -10,5 +9,6 @@ ssl/*pem
109
hgunderson/qrcode.config
1110
kbennett/fider/secrets.nix
1211
kbennett/cf-apikey
12+
mross/wg*
1313
mross/client_id
1414
mross/hockey-pen-stats.env

mross/wireguard.nix

+14
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,26 @@
3333
allowedIPs = [ "192.168.1.13/32" "2001:bc8:2e2a:3:3::1/80" ];
3434
persistentKeepalive = 25;
3535
}
36+
{
37+
publicKey = "pN5HOzguLrG9YTEEYrI1D3Qm8tcXwn541lNTtahdLik="; # Mami
38+
allowedIPs = [ "192.168.1.14/32" "2001:bc8:2e2a:3:4::1/80" ];
39+
persistentKeepalive = 25;
40+
}
41+
{
42+
publicKey = "cbmzzMFmkjCMJKtFeozFeKIizaLbt+fe8/Qa7vpjuxc="; # Papi
43+
allowedIPs = [ "192.168.1.15/32" "2001:bc8:2e2a:3:5::1/80" ];
44+
persistentKeepalive = 25;
45+
}
3646
];
3747
postSetup = ''
3848
${pkgs.iptables}/bin/iptables -t nat -I POSTROUTING -o enp0s20f0 -j MASQUERADE
49+
${pkgs.iptables}/bin/ip6tables -A FORWARD -i vpn -j ACCEPT
50+
${pkgs.iptables}/bin/ip6tables -A FORWARD -o vpn -j ACCEPT
3951
'';
4052
postShutdown = ''
4153
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -o enp0s20f0 -j MASQUERADE
54+
${pkgs.iptables}/bin/ip6tables -D FORWARD -i vpn -j ACCEPT
55+
${pkgs.iptables}/bin/ip6tables -D FORWARD -o vpn -j ACCEPT
4256
'';
4357
};
4458
};

0 commit comments

Comments
 (0)