Invalid port format

Looks fine to me.

root@azure:~# v-add-firewall-rule accept 100.0.0.0/8 22,25,465,587,21,80,443,12000-12100 tcp tailscale
Error: invalid port format :: 22,25,465,587,21,80,443,12000-12100

Hello @arktex54,

Yes, looks fine.

Seems a bug in function is_fw_port_format_valid in $HESTIA/func/main.sh file.

Edit file $HESTIA/func/main.sh and in line 1013 change this:

            if ! [[ "$1" =~ ^[0-9][-|,|:|0-9]{0,30}[0-9]$ ]]; then

to this (just change 30 for something higher… like 50):

            if ! [[ "$1" =~ ^[0-9][-|,|:|0-9]{0,50}[0-9]$ ]]; then

Save the file and try again.

2 Likes

Why it was ever listed to 30 chars long. Still don’t know…

2 Likes

That fix worked. Thanks. Anyway else looking, find

# Firewall port validator

and it is a few lines below that.

2 Likes

This PR raises the chars limit from 32 (1+30+1) to 78 (1+76+1). More than 78 characters break the Web UI.

3 Likes

Merged…

Was about to make a PR my self…

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.