Migrate from WG to TS/HS
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
{ ... }: {
|
||||
{ config, ... }: {
|
||||
networking = {
|
||||
hostName = "eve-psr-nix0";
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 5000 23231 23232 23233 ];
|
||||
allowedUDPPorts = [ 53 51820 ];
|
||||
trustedInterfaces = [ "tun0" ];
|
||||
};
|
||||
nat = {
|
||||
enable = true;
|
||||
externalInterface = "enp1s0";
|
||||
internalInterfaces = [ "tun0" "wg0" ];
|
||||
allowedUDPPorts = [ 53 51820 config.services.tailscale.port ];
|
||||
extraCommands = ''
|
||||
iptables -t nat -A POSTROUTING -s 100.64.0.0/10 -o enp1s0 -j MASQUERADE
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
iptables -t nat -D POSTROUTING -s 100.64.0.0/10 -o enp1s0 -j MASQUERADE
|
||||
'';
|
||||
};
|
||||
nat.enable = true;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user