add port forward for music
This commit is contained in:
parent
85b7b3f370
commit
b1823c1d2c
1 changed files with 21 additions and 1 deletions
|
@ -1,7 +1,27 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
networking.firewall.allowedUDPPorts = [ 51820 51821 ];
|
networking.firewall = {
|
||||||
|
allowedUDPPorts = [
|
||||||
|
# wireguards
|
||||||
|
51820
|
||||||
|
51821
|
||||||
|
];
|
||||||
|
allowedTCPPorts = [
|
||||||
|
# port forward ssh to music
|
||||||
|
2020
|
||||||
|
];
|
||||||
|
# port-forward ssh to the music machine
|
||||||
|
extraCommands = ''
|
||||||
|
iptables -t nat -I PREROUTING -p tcp --dport 2020 -j DNAT --to-destination 10.34.45.101:22
|
||||||
|
'';
|
||||||
|
extraStopCommands = ''
|
||||||
|
iptables -t nat -D PREROUTING -p tcp --dport 2020 -j DNAT --to-destination 10.34.45.101:22 || true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
networking.wireguard.enable = true;
|
networking.wireguard.enable = true;
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
# oxalab
|
# oxalab
|
||||||
netdevs."oxalab" = {
|
netdevs."oxalab" = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue