Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions apps/collabora_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,11 @@ edited the DNS settings for $SUBDOMAIN, and opened port 80 and 443 \
directly to this servers IP. A full exstensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router. \
You will be offered to use UPNP in the next step.

PLEASE NOTE:
Using other ports than the default 80 and 443 is not supported, \
though it may be possible with some custom modification:
https://help.nextcloud.com/t/domain-refused-to-connect-collabora/91303/17"

if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi

# Get the latest packages
apt-get update -q4 & spinner_loading

Expand Down
11 changes: 0 additions & 11 deletions apps/eurooffice_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,11 @@ edited the DNS settings for $SUBDOMAIN, and opened port 80 and 443 \
directly to this servers IP. A full extensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router. \
You will be offered to use UPNP in the next step.

PLEASE NOTE:
Using other ports than the default 80 and 443 is not supported, \
though it may be possible with some custom modification:
https://help.nextcloud.com/t/domain-refused-to-connect-collabora/91303/17"

if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi

# Get the latest packages
apt-get update -q4 & spinner_loading

Expand Down
11 changes: 0 additions & 11 deletions apps/pico_cms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,11 @@ edited the DNS settings for $SUBDOMAIN, and opened port 80 and 443 \
directly to this servers IP. A full extensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router. \
You will be offered to use UPNP in the next step.

PLEASE NOTE:
Using other ports than the default 80 and 443 is not supported, \
though it may be possible with some custom modification:
https://help.nextcloud.com/t/domain-refused-to-connect-collabora/91303/17"

if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi

# Get the latest packages
apt-get update -q4 & spinner_loading

Expand Down
22 changes: 0 additions & 22 deletions apps/talk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,10 @@ check_command systemctl restart coturn.service
# Warn user to open port
msg_box "You have to open $TURN_PORT TCP/UDP in your firewall or your TURN/STUN server won't work!

This can be done automatically if you have UPNP enabled in your firewall/router. \
You will be offered to use UPNP in the next step.

After you hit OK, the script will check if the port is open or not. If it fails \
and you want to run this script again, just execute this in your CLI:
sudo bash /var/scripts/menu.sh, and choose 'Talk'."

if yesno_box_no "Do you want to use UPNP to open port $TURN_PORT?"
then
unset FAIL
open_port "$TURN_PORT" TCP
open_port "$TURN_PORT" UDP
cleanup_open_port
fi

# Check if the port is open
check_open_port "$TURN_PORT" "$TURN_DOMAIN"

Expand Down Expand Up @@ -269,22 +258,11 @@ edited the DNS settings for $SUBDOMAIN, and opened port 80 and 443 \
directly to this servers IP. A full extensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router. \
You will be offered to use UPNP in the next step.

PLEASE NOTE:
Using other ports than the default 80 and 443 is not supported, \
though it may be possible with some custom modification:
https://help.nextcloud.com/t/domain-refused-to-connect-collabora/91303/17"

if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi

# Check if $SUBDOMAIN exists and is reachable
print_text_in_color "$ICyan" "Checking if $SUBDOMAIN exists and is reachable..."
domain_check_200 "$SUBDOMAIN"
Expand Down
12 changes: 0 additions & 12 deletions apps/tmbitwarden.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ Please also report any issues regarding this script setup to $ISSUES"

msg_box "The necessary preparations to run expose Bitwarden to the internet are:
1. Please open port 443 and 80 and point to this server.
(You will be asked if you want to use UPNP to open those ports automatically in the next step.)
2. Please create a DNS record for your subdomain and point that to this server.
3. Raise the amount of RAM to this server to at least 4 GB."

Expand Down Expand Up @@ -201,22 +200,11 @@ edited the DNS settings for $SUBDOMAIN, and opened port 80 and 443 \
directly to this servers IP. A full extensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router.
You will be offered to use UPNP in the next step.

PLEASE NOTE:
Using other ports than the default 80 and 443 is not supported, \
though it may be possible with some custom modification:
https://help.nextcloud.com/t/domain-refused-to-connect-collabora/91303/17"

if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi

# Curl the lib another time to get the correct HTTPS_CONF
# shellcheck source=lib.sh
source /var/scripts/fetch_lib.sh
Expand Down
12 changes: 0 additions & 12 deletions apps/vaultwarden.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,11 @@ edited the DNS settings for $SUBDOMAIN, and opened port 80 and 443 \
directly to this servers IP. A full extensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router.
You will be offered to use UPNP in the next step.

PLEASE NOTE:
Using other ports than the default 80 and 443 is not supported, \
though it may be possible with some custom modification:
https://help.nextcloud.com/t/domain-refused-to-connect-collabora/91303/17"

# Ask for UPNP
if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi

# Check if $SUBDOMAIN exists and is reachable
print_text_in_color "$ICyan" "Checking if $SUBDOMAIN exists and is reachable..."
domain_check_200 "$SUBDOMAIN"
Expand Down
16 changes: 2 additions & 14 deletions lets-encrypt/activate-tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ If you want to get a domain at a fair price, please check this out: https://www.

2. Open port 80 and 443 against this servers IP address: $ADDRESS.
Here is a guide: https://www.techandme.se/open-port-80-443
It's also possible to automatically open ports with UPNP, if you have that enabled in your firewall/router.

PLEASE NOTE:
This script can be run again by executing: sudo bash $SCRIPTS/menu.sh, and choose 'Server Configuration' --> 'Activate TLS'"
Expand All @@ -39,7 +38,7 @@ bash /var/scripts/menu.sh and choose 'Server Configuration' --> 'Activate TLS'"
exit
fi

if ! yesno_box_yes "Have you opened port 80 and 443 in your router, or are you using UPNP?"
if ! yesno_box_yes "Have you opened port 80 and 443 in your router?"
then
msg_box "OK, but if you want to run this script later, just execute this in your CLI: sudo \
bash /var/scripts/menu.sh and choose 'Server Configuration' --> 'Activate TLS'"
Expand All @@ -62,18 +61,7 @@ if [ -z "$DEDYNDOMAIN" ]
then
msg_box "Before continuing, please make sure that you have you have edited the DNS settings for $TLSDOMAIN, \
and opened port 80 and 443 directly to this servers IP. A full extensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router. \
You will be offered to use UPNP in the next step."

if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi
https://www.techandme.se/open-port-80-443"
fi

# Curl the lib another time to get the correct https_conf
Expand Down
20 changes: 0 additions & 20 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1144,26 +1144,6 @@ fi
restart_webserver
}

# Use like this: open_port 443 TCP
# or e.g. open_port 3478 UDP
open_port() {
install_if_not miniupnpc
print_text_in_color "$ICyan" "Trying to open port $1 automatically..."
if ! upnpc -a "$ADDRESS" "$1" "$1" "$2" &>/dev/null
then
msg_box "Failed to open port $1 $2 automatically. You have to do this manually."
FAIL=1
fi
}

cleanup_open_port() {
if [ -n "$FAIL" ]
then
apt-get purge miniupnpc -y
apt-get autoremove -y
fi
}

# Check if port is open # check_open_port 443 domain.example.com
check_open_port() {
print_text_in_color "$ICyan" "Checking if port ${1} is open..."
Expand Down
13 changes: 1 addition & 12 deletions not-supported/jellyfin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,7 @@ source /var/scripts/fetch_lib.sh
msg_box "Before continuing, please make sure that you have \
edited the DNS settings for $SUBDOMAIN, and opened port 80 and 443 \
directly to this servers IP. A full extensive guide can be found here:
https://www.techandme.se/open-port-80-443

This can be done automatically if you have UPNP enabled in your firewall/router. \
You will be offered to use UPNP in the next step."

if yesno_box_no "Do you want to use UPNP to open port 80 and 443?"
then
unset FAIL
open_port 80 TCP
open_port 443 TCP
cleanup_open_port
fi
https://www.techandme.se/open-port-80-443"

# Get the latest packages
apt-get update -q4 & spinner_loading
Expand Down
9 changes: 1 addition & 8 deletions not-supported/plexmediaserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,7 @@ This script is not at the end yet so please continue."
# Ask if external acces shall get activated
if yesno_box_yes "Do you want to enable access for PLEX from outside of your LAN?"
then
msg_box "You will have to open port 32400 TCP to make this work.
You will have the option to automatically open this port by using UPNP in the next step."
if yesno_box_no "Do you want to use UPNP to open port 32400 TCP?"
then
unset FAIL
open_port 32400 TCP
cleanup_open_port
fi
msg_box "You will have to open port 32400 TCP in your router to make this work."
msg_box "After you hit okay, we will check if port 32400 TCP is open."
check_open_port 32400 "$WANIP4"
fi
Expand Down
20 changes: 1 addition & 19 deletions not-supported/wireguard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,7 @@ msg_box "To make WireGuard work, you will need to open port $WIREGUARD_PORT UDP
in your router and forward it to this server.

Attention! The web interface on port $WIREGUARD_PROXY_PORT TCP must NOT be \
forwarded, since it is only meant to be reachable inside your local network!

You will have the option to automatically open port $WIREGUARD_PORT UDP by \
using UPNP after the installation succeeded."

if yesno_box_no "Do you want to use UPNP to open port $WIREGUARD_PORT UDP?"
then
# The forward is only created after the installation succeeded, so that a
# failing install doesn't leave an open port to a non-existing VPN server
USE_UPNP=yes
fi
forwarded, since it is only meant to be reachable inside your local network!"

# Check the port
if ! yesno_box_yes "Unfortunately we are not able to check automatically if port \
Expand Down Expand Up @@ -385,14 +375,6 @@ Please report this issue here $ISSUES if you can't solve it yourself."
exit 1
fi

# Now that the server actually runs, open the port in the router if chosen
if [ "$USE_UPNP" = "yes" ]
then
unset FAIL
open_port "$WIREGUARD_PORT" UDP
cleanup_open_port
fi

# Inform the user about the successful installation
if [ "$EXISTING_CONFIG" = "yes" ]
then
Expand Down
10 changes: 1 addition & 9 deletions old/pivpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,7 @@ It should most likely point to your home ip address via DDNS.")
fi

# Inform user to open Port
msg_box "To make Wireguard work, you will need to open port 51820 UDP.

You will have the option to automatically open this port by using UPNP in the next step."
if yesno_box_no "Do you want to use UPNP to open port 51820 UDP?"
then
unset FAIL
open_port 51820 UDP
cleanup_open_port
fi
msg_box "To make Wireguard work, you will need to open port 51820 UDP in your router."

# Check the port
if ! yesno_box_yes "Unfortunately we are not able to check automatically if port 51820 UDP is open. So please make sure to open it correctly!\nDo you still want to continue?"
Expand Down
Loading