diff options
| author | 2024-11-12 22:26:02 -0500 | |
|---|---|---|
| committer | 2024-11-12 22:36:49 -0500 | |
| commit | 53a0a5473f45d37027af9663638adbf56667e4ca (patch) | |
| tree | 05c6c39678a9005f95c00e0fdf31193657bd4d3d /hosts/iroha/scripts/port-forward | |
| download | dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.gz dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.bz2 dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.zip | |
Hopefully no leaks
Diffstat (limited to 'hosts/iroha/scripts/port-forward')
| -rwxr-xr-x | hosts/iroha/scripts/port-forward | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hosts/iroha/scripts/port-forward b/hosts/iroha/scripts/port-forward new file mode 100755 index 0000000..fa759d7 --- /dev/null +++ b/hosts/iroha/scripts/port-forward @@ -0,0 +1,12 @@ +#! /usr/bin/env sh + +su -c "iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984 || \ +iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984; +iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984 || \ +iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984; +iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.252:47989 || \ +iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.252:47989; +iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.252:48010 || \ +iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.252:48010; +iptables -t nat -C PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.252:47998-48000 || \ +iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.252:47998-48000;" |