summaryrefslogtreecommitdiff
path: root/nix_archive/port-forward
diff options
context:
space:
mode:
Diffstat (limited to 'nix_archive/port-forward')
-rwxr-xr-xnix_archive/port-forward33
1 files changed, 33 insertions, 0 deletions
diff --git a/nix_archive/port-forward b/nix_archive/port-forward
new file mode 100755
index 0000000..f1965a6
--- /dev/null
+++ b/nix_archive/port-forward
@@ -0,0 +1,33 @@
+#! /usr/bin/env sh
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo 'This script must be run by root.' >&2
+ exit 1
+fi
+
+# Sunshine
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984
+#
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984
+#
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.251:47989 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.251:47989
+#
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.251:48010 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.251:48010
+#
+#iptables -t nat -C PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.251:47998-48000 || \
+# iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.251:47998-48000
+
+# KDEConnect
+iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764 || \
+ iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764
+
+iptables -t nat -C PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764 || \
+ iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764
+
+# Delete KDEConnect
+#iptables -t nat -D PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764
+#iptables -t nat -D PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764