NOTA: Esses recursos GRÁTIS foram testados por mim, incluindo esse blog que você está lendo, está hospedado num servidor Oracle criado como Always Free.
echo -e "\nHospedando Sites em Casa\n\nG R Á T I S" | boxes -d sunset -a c -s 80
.
. | .
\ | /
'. \ ' / .'
'. .'```'. .'
<>.........................:::::::`.......`:::::::........................<>
<>: :<>
<>: Hospedando Sites em Casa :<>
<>: :<>
<>: G R Á T I S :<>
<>:......................................................................:<> jgs
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
hostname
no no-ip grátisEu registrei o hostname jarbelix.sytes.net e coloquei inicialmente meu IP externo que a operadora Vivo disponibilizou.
Não sabe seu IP externo? Acesse https://meuip.remontti.com.br/ e descubra.
Eu registrei dois domínios jarbelix.tk e tiozaodolinux.tk
Agora posso criar entradas DNS desses domínios apontando para os IP que forem necessários.
ISO
root
no seu servidor instale o serviço que irá manter seu hostname atualizado com seu IP externo fornecido pela operadora.# Instalar pacote
apt update
apt install ddupdate -y
ddupdate-config
WARNING - Cannot open config file '/etc/ddupdate.conf' for read
1 changeip.com Updates on http://changeip.com/
2 cloudflare.com Updates on https://cloudflare.com
3 dnsdynamic.org Updates on http://dnsdynamic.org/
4 dnsexit.com Updates on https://www.dnsexit.com
5 dnspark.com Updates on https://dnspark.com/
6 domains.google.com Updates on https://domains.google.com
7 dry-run Debug dummy update plugin
8 dtdns.com Updates on https://www.dtdns.com
9 duckdns.org Updates on http://duckdns.org
10 duiadns.net Updates on https://www.duiadns.net
11 dy.fi Updates on https://www.dy.fi/
12 dynu.com Updates on https://www.dynu.com/en-US/DynamicDNS
13 dynv6.com Updates on http://dynv6.com
14 freedns.afraid.org Updates on https://freedns.afraid.org
15 freedns.io Updates on https://freedns.io
16 hurricane_electric Updates on https://he.com
17 myonlineportal.net Updates on http://myonlineportal.net/
18 no-ip.com Updates on http://no-ip.com/
19 now-dns.com Updates on http://now-dns.com
20 nsupdate Update address via nsupdate
21 system-ns.com Updates on https://system-ns.com
Select service to use: 18
[no-ip.com] username :jarbelix
[no-ip.com] password :XXXXXXXXXX
[no-ip.com] hostname: jarbelix.sytes.net
Probing for addresses, can take some time...
1 Use address as seen from Internet [179.182.68.145]
2 Use address as seen on local network [10.70.0.244]
3 Use address as decided by service
Select address to register (1, 2, 3) [1]: 1
Patched .netrc: /home/jjunior/.netrc
Patched config: /home/jjunior/.config/ddupdate.conf
Starting service and displaying logs
jan 30 09:45:00 stdlnx001616 systemd[13501]: Starting Update DNS data for this host...
jan 30 09:45:00 stdlnx001616 ddupdate[3873253]: INFO - Loglevel: INFO
jan 30 09:45:00 stdlnx001616 ddupdate[3873253]: INFO - Using hostname: jarbelix.sytes.net
jan 30 09:45:00 stdlnx001616 ddupdate[3873253]: INFO - Using ip address plugin: default-web-ip
jan 30 09:45:00 stdlnx001616 ddupdate[3873253]: INFO - Using service plugin: no-ip.com
jan 30 09:45:00 stdlnx001616 ddupdate[3873253]: INFO - Service options:
jan 30 09:45:00 stdlnx001616 ddupdate[3873253]: INFO - Address options:
jan 30 09:45:00 stdlnx001616 ddupdate[3873253]: INFO - Using ip address: ['179.182.68.145', None]
jan 30 09:45:01 stdlnx001616 ddupdate[3873253]: INFO - Update OK
jan 30 09:45:01 stdlnx001616 systemd[13501]: Finished Update DNS data for this host.
Use "journalctl --user -u ddupdate.service" to display logs.
Shall I run service regularly (Yes/No) [No]: No
Stopping ddupdate.timer
Failed to stop ddupdate.timersystemctl.service: Unit ddupdate.timersystemctl.service not loaded.
Failed to stop disable.service: Unit disable.service not loaded.
Start ddupdate using "systemctl --user start ddupdate.timer; systemctl --user enable ddupdate.timer"
To run service from boot and after logout do "sudo loginctl enable-linger $USER"
crontab -e
e acrescente a seguinte linha*/15 * * * * ( date; ddupdate --force --hostname jarbelix.sytes.net ) > /tmp/ddupdate.log 2>&1
ddupdate --loglevel debug --force --hostname jarbelix.sytes.net
DEBUG - Using config file: /root/.config/ddupdate.conf
INFO - Loglevel: DEBUG
INFO - Using hostname: jarbelix.sytes.net
INFO - Using ip address plugin: default-web-ip
INFO - Using service plugin: no-ip.com
INFO - Service options:
INFO - Address options:
INFO - Processing configuration section: update
DEBUG - paths :/usr/lib/python3.11:/root/.local/share/ddupdate:/root/.local/share/flatpak/exports/share/ddupdate:/var/lib/flatpak/exports/share/ddupdate:/usr/local/share/ddupdate:/usr/share/ddupdate
DEBUG - Loaded 0 address, 0 service and 0 auth plugins from /usr/lib/python3.11
DEBUG - Loaded 0 address, 0 service and 0 auth plugins from /root/.local/share/ddupdate
DEBUG - Loaded 0 address, 0 service and 0 auth plugins from /root/.local/share/flatpak/exports/share/ddupdate
DEBUG - Loaded 0 address, 0 service and 0 auth plugins from /var/lib/flatpak/exports/share/ddupdate
DEBUG - Loaded 0 address, 0 service and 0 auth plugins from /usr/local/share/ddupdate
DEBUG - Loaded 9 address, 21 service and 2 auth plugins from /usr/share/ddupdate
DEBUG - Using auth plugin: netrc
DEBUG - trying http://checkip.dyndns.org/
DEBUG - Got response: <html><head><title>Current IP Check</title></head><body>Current IP Address: 177.17.196.23</body></html>
INFO - Using ip address: ['177.17.196.23', None]
DEBUG - Removing cache file: /root/.cache/ddupdate/no-ip.com.ip
DEBUG - Trying url: http://dynupdate.no-ip.com/nic/update?hostname=jarbelix.sytes.net&myip=177.17.196.23
DEBUG - Got response (200) : nochg 177.17.196.23
INFO - Update OK
Isso permitirá que seu PC seja exposto pra internet com todos os serviços
Existem diversos tipos de roteadores fornecidos pelas operadoras. Como cliente da Vivo tenho um VIVO BOX. Fixei meu IP interno no roteador e coloquei esse IP interno na DMZ.
Acesse Ubuntu-Nuvem-Oracle e siga as instruções.
DICA: A operadora Vivo não libera as portas 80/443 para acesso externo.
Através do https://www.ipfingerprints.com/portscan.php validei as portas liberadas: 22 e 8443.
Pode parece confuso, mas é simples: você precisa acessar sua aplicação em docker que está rodando em seu servidor de casa, mas a operadora não permite o acesso direto na porta desejada. Então utilizamos a instância da Oracle para que ela se conecte no seu hostname e na porta que o seu nginx local responde e este direciona para a aplicação. Ou seja, é um proxy externo passando para outro proxy interno.