Update Wireguard client also
This commit is contained in:
parent
08827b5d5d
commit
48a2e3211d
12 changed files with 128 additions and 110 deletions
|
@ -4,8 +4,8 @@
|
|||
./boot
|
||||
./disko
|
||||
./filesystems
|
||||
./firewall
|
||||
./hardware
|
||||
./network
|
||||
./services
|
||||
./users
|
||||
../../modules/system
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking.nftables.tables.forwarding = {
|
||||
family = "inet";
|
||||
content = ''
|
||||
chain incoming {
|
||||
type nat hook prerouting priority dstnat; policy accept;
|
||||
tcp dport 2211 dnat ip to 11.0.0.100:22 comment "Tower SSH"
|
||||
tcp dport 2222 dnat ip to 11.0.0.2:22 comment "Kitty SSH"
|
||||
tcp dport 2233 dnat ip to 11.0.0.101:22 comment "Envy SSH"
|
||||
tcp dport 2244 dnat ip to 11.0.0.102:22 comment "Intuos SSH"
|
||||
|
||||
udp dport { 27005, 27015 } dnat ip to 11.0.0.100 comment "PC Hosted Games"
|
||||
|
||||
tcp dport { 48010, 47989, 47984 } dnat ip to 11.0.0.100 comment "PC Sunshine TCP"
|
||||
udp dport { 47998, 47999, 48000 } dnat ip to 11.0.0.100 comment "PC Sunshine UDP"
|
||||
}
|
||||
|
||||
chain forward {
|
||||
type nat hook postrouting priority 100; policy accept;
|
||||
masquerade
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Enable IP forwarding for the server configuration
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||
}
|
38
hosts/midas/network/default.nix
Normal file
38
hosts/midas/network/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking = {
|
||||
interfaces."eno1".ipv4.addresses = [{
|
||||
address = "10.2.0.1";
|
||||
prefixLength = 8;
|
||||
}];
|
||||
defaultGateway = {
|
||||
address = "10.1.0.1";
|
||||
interface = "eno1";
|
||||
};
|
||||
nftables.tables.forwarding = {
|
||||
family = "inet";
|
||||
content = ''
|
||||
chain incoming {
|
||||
type nat hook prerouting priority dstnat; policy accept;
|
||||
tcp dport 2211 dnat ip to 11.0.0.100:22 comment "Tower SSH"
|
||||
tcp dport 2222 dnat ip to 11.0.0.2:22 comment "Kitty SSH"
|
||||
tcp dport 2233 dnat ip to 11.0.0.101:22 comment "Envy SSH"
|
||||
tcp dport 2244 dnat ip to 11.0.0.102:22 comment "Intuos SSH"
|
||||
|
||||
udp dport { 27005, 27015 } dnat ip to 11.0.0.100 comment "PC Hosted Games"
|
||||
|
||||
tcp dport { 48010, 47989, 47984 } dnat ip to 11.0.0.100 comment "PC Sunshine TCP"
|
||||
udp dport { 47998, 47999, 48000 } dnat ip to 11.0.0.100 comment "PC Sunshine UDP"
|
||||
}
|
||||
|
||||
chain forward {
|
||||
type nat hook postrouting priority 100; policy accept;
|
||||
masquerade
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Enable IP forwarding for the server configuration
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
trilium-server.enable = true;
|
||||
vaultwarden.enable = true;
|
||||
webserver.enable = true;
|
||||
wireguard.server.enable = true;
|
||||
wg.server.enable = true;
|
||||
|
||||
minecraft-servers = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue