MysticRyuujin / guac-install

Script for installing Guacamole on Ubuntu
988 stars 272 forks source link

Firewall is blocking sometimes #132

Closed FelipeEsBr closed 4 years ago

FelipeEsBr commented 4 years ago

ufw allow 8080 comment 'tomcat allowed'

MysticRyuujin commented 4 years ago

So I'm not very familiar with ufw and how it works/behaves, it's off by default on most Ubunutu/Debian installs I've ran. I checked my Ubuntu 18.04 and when I run sudo ufw status I get Status: inactive

Would something like this fix it?

if [[ $(ufw status | grep inactive | wc -l) -eq 0 ]]; then
    ufw allow 8080 comment 'tomcat allowed'
fi

I don't know enough about ufw to know if that's a "universal fix" that I should include here.

Edit, actually I should probably make sure it's a valid command first so:

if [ -x "$( command -v ufw )" ]; then
    if [[ $(ufw status | grep inactive | wc -l) -eq 0 ]]; then
        ufw allow 8080/tcp comment 'tomcat allowed'
    fi
fi

2nd Edit: This should be TCP only fixed ^