Open OhioVR opened 5 years ago
On my Ubuntu 16 server install the line:
SERVER_HOST=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | grep -oE '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | head -1)
was producing my server's lan IP and I was unable to connect to websites on iOS
Changing that line to:
SERVER_HOST="$(dig +short myip.opendns.com @resolver1.opendns.com)"
found my WAN IP and I was able to connect
I didn't do a pull request because I don't know if that would break other distros
https://coderwall.com/p/lyrjsq/extract-your-external-ip-using-command-line-tools
On my Ubuntu 16 server install the line:
SERVER_HOST=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | grep -oE '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | head -1)
was producing my server's lan IP and I was unable to connect to websites on iOS
Changing that line to:
SERVER_HOST="$(dig +short myip.opendns.com @resolver1.opendns.com)"
found my WAN IP and I was able to connect
I didn't do a pull request because I don't know if that would break other distros