diff --git a/net/gce.sh b/net/gce.sh index 9a5cfe425..f8a417869 100755 --- a/net/gce.sh +++ b/net/gce.sh @@ -478,7 +478,6 @@ $( install-nodejs.sh \ install-redis.sh \ install-rsync.sh \ - install-socat.sh \ network-config.sh \ remove-docker-interface.sh \ diff --git a/net/net.sh b/net/net.sh index 49cf29114..f372f739a 100755 --- a/net/net.sh +++ b/net/net.sh @@ -409,7 +409,6 @@ stopNode() { for pattern in solana- remote-; do pkill -9 \$pattern done - sudo killall socat " ) || true } diff --git a/net/remote/remote-node.sh b/net/remote/remote-node.sh index 0731d4839..e5c117563 100755 --- a/net/remote/remote-node.sh +++ b/net/remote/remote-node.sh @@ -116,7 +116,17 @@ local|tar) if [[ $nodeType = blockstreamer ]]; then npm install @solana/blockexplorer@1 npx solana-blockexplorer > blockexplorer.log 2>&1 & - sudo socat -lf socat.log TCP-LISTEN:80,reuseaddr,fork,su=nobody TCP:localhost:5000 & + + # Confirm the blockexplorer is accessible + curl --head --retry 3 --retry-connrefused http://localhost:5000/ + + # Redirect port 80 to port 5000 + sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT + sudo iptables -A INPUT -p tcp --dport 5000 -j ACCEPT + sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 5000 + + # Confirm the blockexplorer is now globally accessible + curl --head "$(curl ifconfig.io)" fi ./multinode-demo/fullnode.sh "${args[@]}" "$entrypointIp":~/solana "$entrypointIp:8001" > fullnode.log 2>&1 & ;; diff --git a/net/scripts/install-socat.sh b/net/scripts/install-socat.sh deleted file mode 100755 index f0e04f4af..000000000 --- a/net/scripts/install-socat.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -# -# socat setup for -# -set -ex - -[[ $(uname) = Linux ]] || exit 1 -[[ $USER = root ]] || exit 1 - -apt-get --assume-yes install socat