I am trying this script in a Ubuntu 18.4 Gen2 machine. copied the content of the script from https://github.com/sajitsasi/az-ip-fwd/blob/main/ip_fwd.sh but while executing this script I am getting below errors
./portfwd.sh: 12: ./portfwd.sh: [[: not found
-e Using ethernet interface eth0
-e Frontend port is 1433
-e Destination IP Address is x.x.x.x
-e Destination Port is 1433
-e Checking whether we're root...
-e Enabling IP forwarding...
./portfwd.sh: 78: ./portfwd.sh: [[: not found
-e Using Destination IP
-e Using Local IP y.y.y.y
-e Creating DNAT rule from x.x.x.x:1433 to :1433...
-e Creating SNAT rule from :1433 to x.x.x.x:1433...
-e Done!
It's essentially failing on below lines
Line 19: if [[ $# -eq 0 ]]; then
Line 85: if [[ ${DEST_HOST} =~ ^[0-9]+.[0-9]+.[0-9]+.[0-9]+$ ]]; then