change port number?

This commit is contained in:
stupidcomputer 2024-11-09 21:35:11 -06:00
parent ae22abd986
commit b6b86824de
2 changed files with 5 additions and 5 deletions

View File

@ -2,19 +2,19 @@
{ {
networking = { networking = {
firewall.allowedUDPPorts = [ 51820 ]; firewall.allowedUDPPorts = [ 50000 ];
wireguard.interfaces = { wireguard.interfaces = {
wg0 = { wg0 = {
ips = [ "10.100.0.2/24" ]; ips = [ "10.100.0.2/24" ];
listenPort = 51820; listenPort = 50000;
privateKeyFile = "/home/usr/wg-keys/private"; privateKeyFile = "/home/usr/wg-keys/private";
peers = [ peers = [
{ # netbox { # netbox
publicKey = "0fOqAfsYO4HvshMPnlkKL7Z1RChq98hjDr0Q8o7OJFE="; publicKey = "0fOqAfsYO4HvshMPnlkKL7Z1RChq98hjDr0Q8o7OJFE=";
allowedIPs = [ "10.100.0.0/24" ]; # only stuff in the wg-subnet (10.100.0.*) allowedIPs = [ "10.100.0.0/24" ]; # only stuff in the wg-subnet (10.100.0.*)
endpoint = "149.28.63.115:51820"; endpoint = "149.28.63.115:50000";
persistentKeepalive = 25; persistentKeepalive = 25;
} }
]; ];

View File

@ -7,13 +7,13 @@
externalInterface = "eth0"; externalInterface = "eth0";
internalInterfaces = [ "wg0" ]; internalInterfaces = [ "wg0" ];
}; };
firewall.allowedUDPPorts = [ 51820 ]; firewall.allowedUDPPorts = [ 50000 ];
wireguard.interfaces = { wireguard.interfaces = {
wg0 = { wg0 = {
ips = [ "10.100.0.1/24" ]; ips = [ "10.100.0.1/24" ];
listenPort = 51820; listenPort = 50000;
postSetup = '' postSetup = ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE