I'm developing a website. Once when I had Windows 10 + XAMPP + Cloudflare-flexible-ssl I could access my website from outside local network with the lock icon appearing in the browsers and https working like a charm (dispite this solution not being secure between my home-server and cloudflare's end). Now I'm using Ubuntu 20.04 + NGINX + self-made ssl certificate with certbot. It is working like a charm from local network but when I try to access my domain from outside my local network I end up with HTTP working fine but HTTPS stuck with ERR_CONNECTION_TIME_OUT or ERR_CONNECTION_REFUSED, mostly after an page loading that takes very long and never ends.
sudo netstat -an | grep "LISTEN "
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:46285 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:33060 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
nmap -sT mydomain.com
Starting Nmap 7.80 ( https://nmap.org ) at 2022-08-31 19:03 -03
Nmap scan report for mydomain.com (127.0.0.1)
Host is up (0.00014s latency).
rDNS record for 127.0.0.1: localhost
Not shown: 996 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
3306/tcp open mysql
nmap -sT my.ipv4.public.ip(192.XX.XXX.XXX)
Starting Nmap 7.80 ( https://nmap.org ) at 2022-08-31 19:11 -03
Nmap scan report for 191-055-235-169.xd-dynamic.algartelecom.com.br (my.ipv4.public.ip)
Host is up (0.0018s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
sudo iptables -L -vn
Chain INPUT (policy DROP 153 packets, 25075 bytes)
pkts bytes target prot opt in out source destination
5282 638K f2b-sshd tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
50363 4662K ufw-before-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
50363 4662K ufw-before-input all -- * * 0.0.0.0/0 0.0.0.0/0
14107 1158K ufw-after-input all -- * * 0.0.0.0/0 0.0.0.0/0
153 25075 ufw-after-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
153 25075 ufw-reject-input all -- * * 0.0.0.0/0 0.0.0.0/0
153 25075 ufw-track-input all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ufw-before-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ufw-before-forward all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ufw-after-forward all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ufw-after-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ufw-reject-forward all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ufw-track-forward all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 7 packets, 316 bytes)
pkts bytes target prot opt in out source destination
24573 61M ufw-before-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
24573 61M ufw-before-output all -- * * 0.0.0.0/0 0.0.0.0/0
2315 144K ufw-after-output all -- * * 0.0.0.0/0 0.0.0.0/0
2315 144K ufw-after-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
2315 144K ufw-reject-output all -- * * 0.0.0.0/0 0.0.0.0/0
2315 144K ufw-track-output all -- * * 0.0.0.0/0 0.0.0.0/0
Chain f2b-sshd (1 references)
pkts bytes target prot opt in out source destination
31 1804 REJECT all -- * * 151.63.97.42 0.0.0.0/0 reject-with icmp-port-unreachable
20 1648 REJECT all -- * * 70.51.16.212 0.0.0.0/0 reject-with icmp-port-unreachable
211 18552 REJECT all -- * * 110.42.190.60 0.0.0.0/0 reject-with icmp-port-unreachable
5020 616K RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-after-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-input (1 references)
pkts bytes target prot opt in out source destination
70 5460 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:137
42 9213 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:138
0 0 ufw-skip-to-policy-input tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:139
0 0 ufw-skip-to-policy-input tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:445
0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:68
13842 1119K ufw-skip-to-policy-input all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type BROADCAST
Chain ufw-after-logging-forward (1 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
Chain ufw-after-logging-input (1 references)
pkts bytes target prot opt in out source destination
146 20965 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
Chain ufw-after-logging-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-forward (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 3
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 11
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 12
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
0 0 ufw-user-forward all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-before-input (1 references)
pkts bytes target prot opt in out source destination
10280 1340K ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
24083 2022K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ufw-logging-deny all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 3
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 11
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 12
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spt:67 dpt:68
16000 1300K ufw-not-local all -- * * 0.0.0.0/0 0.0.0.0/0
1836 138K ACCEPT udp -- * * 0.0.0.0/0 224.0.0.251 udp dpt:5353
0 0 ACCEPT udp -- * * 0.0.0.0/0 239.255.255.250 udp dpt:1900
14164 1162K ufw-user-input all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-before-logging-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-logging-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-logging-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-output (1 references)
pkts bytes target prot opt in out source destination
10282 1340K ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
11976 60M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
2315 144K ufw-user-output all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-logging-allow (0 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW ALLOW] "
Chain ufw-logging-deny (2 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID limit: avg 3/min burst 10
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
Chain ufw-not-local (1 references)
pkts bytes target prot opt in out source destination
210 28471 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
1836 138K RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type MULTICAST
13954 1133K RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type BROADCAST
0 0 ufw-logging-deny all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-reject-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-reject-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-reject-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-skip-to-policy-forward (0 references)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-skip-to-policy-input (7 references)
pkts bytes target prot opt in out source destination
13954 1133K DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-skip-to-policy-output (0 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-track-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-track-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-track-output (1 references)
pkts bytes target prot opt in out source destination
2112 127K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 ctstate NEW
196 16547 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 ctstate NEW
Chain ufw-user-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-input (1 references)
pkts bytes target prot opt in out source destination
45 2732 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
9 492 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
3 172 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
0 0 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1701
0 0 DROP udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:1701
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:443
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443 /* 'dapp_Nginx%20Full' */
Chain ufw-user-limit (0 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] "
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain ufw-user-limit-accept (0 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-user-logging-forward (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-logging-input (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-logging-output (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-output (1 references)
pkts bytes target prot opt in out source destination
sudo nano /etc/nginx/sites-available/mydomain.com.conf
map $http_origin $allow_origin {
~^https?://(.*\.)?lojascolmeia.com.br(:\d+)?$ $http_origin;
~^https?://(.*\.)?localhost(:\d+)?$ $http_origin;
default "";
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream wsbackend {
server localhost:2020;
}
server {
# gzip Settings
#should add!!!: gzip_static on;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript;
# cache-control
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|webp|webm|ttf|)$ {
expires 1M;
access_log off;
# max-age must be in seconds
add_header Cache-Control "max-age=8380800, public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "max-age=8380800, public";
}
server_name _ mydomain.com;
error_page 500 502 503 504 /50x.html;
index index.php;
root /var/www/html/mydomain;
access_log /var/www/html/logs/nginx_access.log;
error_log /var/www/html/logs/nginx_error.log;
# HEADERS
add_header 'Access-Control-Allow-Origin' $allow_origin;
# content-security-policy
add_header X-Frame-Options SAMEORIGIN always;
add_header X-Content-Type-Options nosniff always;
add_header X-XSS-Protection "1; mode=block" always;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?goto=$uri&$args;
}
client_max_body_size 100M;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
location /dbadm {
auth_basic "Admin Login";
auth_basic_user_file /etc/nginx/pma_pass;
}
# location ~ \.json {
# add_header Content-Type application/json;
# }
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/lojascolmeia.com.br/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/lojascolmeia.com.br/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
#proxy_ssl_server_name on;
location /websocket {
proxy_pass http://127.0.0.1:8443;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_redirect off;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
keepalive_timeout 86400s;
# prevents 502 bad gateway error
proxy_ignore_client_abort on;
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
}
server {
if ($host = mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name _ mydomain.com;
listen 80;
return 404; # managed by Certbot
}
sudo nano /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;
server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server_tokens off; #https://ubiq.co/tech-blog/hide-nginx-server-version-header/
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
tcpdump and then loading my webpage from localnetwork
sudo tcpdump -n -i any src or dst 192.XX.XXX.XXX(home-network-ipv4-public-ip-from-another-device-from-local-network-connected-to-my-server-via-ssh)
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
19:35:39.086944 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [S], seq 3186999685, win 64240, options [mss 1412,nop,wscale 8,nop,nop,sackOK], length 0
19:35:39.087013 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [S.], seq 2236039596, ack 3186999686, win 64240, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
19:35:39.091325 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 1, win 512, length 0
19:35:39.091377 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 1:518, ack 1, win 512, length 517
19:35:39.091399 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], ack 518, win 501, length 0
19:35:39.092254 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 1:1413, ack 518, win 501, length 1412
19:35:39.092256 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 1413:2825, ack 518, win 501, length 1412
19:35:39.092257 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 2825:4097, ack 518, win 501, length 1272
19:35:39.093381 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 2825, win 512, length 0
19:35:39.094964 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 4097:4580, ack 518, win 501, length 483
19:35:39.096049 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 4580, win 512, length 0
19:35:39.102807 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 518:582, ack 4580, win 512, length 64
19:35:39.102834 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 582:674, ack 4580, win 512, length 92
19:35:39.102887 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], ack 674, win 501, length 0
19:35:39.103058 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 4580:4659, ack 674, win 501, length 79
19:35:39.103137 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 4659:4738, ack 674, win 501, length 79
19:35:39.103205 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 4738:4809, ack 674, win 501, length 71
19:35:39.103301 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 674:1365, ack 4580, win 512, length 691
19:35:39.104771 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 4809, win 512, length 0
19:35:39.104793 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 1365:1396, ack 4809, win 512, length 31
19:35:39.104812 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], ack 1396, win 501, length 0
19:35:39.115063 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 4809:6221, ack 1396, win 501, length 1412
19:35:39.115066 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 6221:7633, ack 1396, win 501, length 1412
19:35:39.115068 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 7633:9045, ack 1396, win 501, length 1412
19:35:39.115069 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 9045:10457, ack 1396, win 501, length 1412
19:35:39.115070 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 10457:11869, ack 1396, win 501, length 1412
19:35:39.115268 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 11869:13281, ack 1396, win 501, length 1412
19:35:39.115384 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 13281:14693, ack 1396, win 501, length 1412
19:35:39.115511 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 14693:16105, ack 1396, win 501, length 1412
19:35:39.115630 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 16105:17517, ack 1396, win 501, length 1412
19:35:39.115749 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 17517:18929, ack 1396, win 501, length 1412
19:35:39.116796 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 7633, win 512, length 0
19:35:39.116831 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 18929:20341, ack 1396, win 501, length 1412
19:35:39.116833 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], seq 20341:21753, ack 1396, win 501, length 1412
19:35:39.116834 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 21753:22031, ack 1396, win 501, length 278
19:35:39.117833 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 17517, win 512, length 0
19:35:39.118256 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 22031, win 512, length 0
19:35:39.391422 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 1396:1615, ack 22031, win 512, length 219
19:35:39.391510 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 1615:2081, ack 22031, win 512, length 466
19:35:39.391551 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], ack 2081, win 501, length 0
19:35:39.391761 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 22031:22066, ack 2081, win 501, length 35
19:35:39.394267 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 22066:22417, ack 2081, win 501, length 351
19:35:39.395852 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [.], ack 22417, win 511, length 0
19:35:39.402034 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 2081:2207, ack 22417, win 511, length 126
19:35:39.402071 enp2s0 In IP 191.55.235.169.54086 > 192.168.1.107.443: Flags [P.], seq 2207:2537, ack 22417, win 511, length 330
19:35:39.402121 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [.], ack 2537, win 501, length 0
19:35:39.402303 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 22417:22452, ack 2537, win 501, length 35
19:35:39.404553 enp2s0 Out IP 192.168.1.107.443 > 191.55.235.169.54086: Flags [P.], seq 22452:22791, ack 2537, win 501, length 339
^C
49 packets captured
49 packets received by filter
0 packets dropped by kernel
**tcpdump and then loading my webpage from device outside local network (over 3G)
sudo tcpdump -n -i any src or dst XXX.XXX.XXX.XXX(my-phone-ip-over-3G)
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
19:59:56.882577 enp2s0 In IP 200.160.124.42.37474 > 192.168.1.107.80: Flags [SEW], seq 1941385008, win 65535, options [mss 1412,nop,wscale 5,nop,nop,TS val 1626285022 ecr 0,sackOK,eol], length 0
19:59:56.882642 enp2s0 Out IP 192.168.1.107.80 > 200.160.124.42.37474: Flags [S.E], seq 971375185, ack 1941385009, win 65160, options [mss 1460,sackOK,TS val 1104199128 ecr 1626285022,nop,wscale 7], length 0
19:59:56.905511 enp2s0 In IP 200.160.124.42.37474 > 192.168.1.107.80: Flags [.], ack 1, win 4112, options [nop,nop,TS val 1626285045 ecr 1104199128], length 0
19:59:56.935141 enp2s0 In IP 200.160.124.42.37474 > 192.168.1.107.80: Flags [P.], seq 1:403, ack 1, win 4112, options [nop,nop,TS val 1626285076 ecr 1104199128], length 402: HTTP: GET / HTTP/1.1
19:59:56.935175 enp2s0 Out IP 192.168.1.107.80 > 200.160.124.42.37474: Flags [.], ack 403, win 506, options [nop,nop,TS val 1104199180 ecr 1626285076], length 0
19:59:56.935289 enp2s0 Out IP 192.168.1.107.80 > 200.160.124.42.37474: Flags [P.], seq 1:359, ack 403, win 506, options [nop,nop,TS val 1104199180 ecr 1626285076], length 358: HTTP: HTTP/1.1 301 Moved Permanently
19:59:56.966260 enp2s0 In IP 200.160.124.42.37474 > 192.168.1.107.80: Flags [.], ack 359, win 4101, options [nop,nop,TS val 1626285105 ecr 1104199180], length 0
19:59:57.087070 enp2s0 In IP 200.160.124.42.37474 > 192.168.1.107.80: Flags [.], ack 359, win 4101, length 0
19:59:57.087096 enp2s0 Out IP 192.168.1.107.80 > 200.160.124.42.37474: Flags [.], ack 403, win 506, options [nop,nop,TS val 1104199332 ecr 1626285105], length 0
20:00:05.684479 enp2s0 In IP 200.160.124.42.37474 > 192.168.1.107.80: Flags [R], seq 1941385411, win 0, length 0
10 packets captured
10 packets received by filter
0 packets dropped by kernel
MY MODEM(NOKIA G-240W-G) CONFIG FOR PORT FOWARDING
enter image description here
What I have done:
Tryed disabling UFW (Ubuntu firewall) but still not working outside local network.
Called my ISP over 10 times. They always say it must be a local network problem. They swear all ports are opened and free to use it.
I'm thinking to fall back to Cloudflare`s flexible ssl and work all trafic upon port 80 or pay for premium internet access or something...
I uploaded my app to an remote VPS exactly the way it was setted on my local network and everything just worked fine. So the problem was my ISP blocking the ports...
i have a question why when i run "openstack overcloud node introspect --all-manageable" is always failed,
here is my instackenv.json :
(undercloud) [stack#tripleo ~]$ cat instackenv.json
{
"nodes":[
{
"capabilities": "profile:compute,boot_option:local",
"name": "tripleo.compute1",
"pm_type": "pxe_ilo",
"pm_user": "admin",
"pm_password": "password",
"pm_addr": "10.14.32.9",
"mac":[
"98:F2:B3:21:DA:46"
]
},
{
"capabilities": "profile:control,boot_option:local",
"name": "tripleo.controller1",
"pm_type": "pxe_ilo",
"pm_user": "admin",
"pm_password": "password",
"pm_addr": "10.14.32.8",
"mac":[
"98:F2:B3:21:FA:10"
]
}
]
}
here is my ironic-inspector.log :
2020-10-16 10:37:33.775 7 ERROR ironic_inspector.node_cache [-] Introspection for nodes [u'14b4b5f0-71ec-4107-9f30-236abb705808', u'fa623d6d-0241-4b3a-a04b-079f1e7ed847'] has timed out
2020-10-16 10:37:33.777 7 DEBUG ironic_inspector.node_cache [-] [node: 14b4b5f0-71ec-4107-9f30-236abb705808 state waiting] Attempting to acquire lock acquire_lock /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:105
2020-10-16 10:37:33.778 7 DEBUG ironic_inspector.node_cache [-] [node: 14b4b5f0-71ec-4107-9f30-236abb705808 state waiting] Successfully acquired lock acquire_lock /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:107
2020-10-16 10:37:33.778 7 DEBUG ironic_inspector.node_cache [-] [node: 14b4b5f0-71ec-4107-9f30-236abb705808 state waiting] Successfully released lock release_lock /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:119
2020-10-16 10:37:33.778 7 DEBUG ironic_inspector.node_cache [-] [node: 14b4b5f0-71ec-4107-9f30-236abb705808 state waiting] Executing fsm(waiting).process_event(timeout) fsm_event /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:207
2020-10-16 10:37:33.778 7 INFO ironic_inspector.node_cache [-] [node: 14b4b5f0-71ec-4107-9f30-236abb705808 state waiting] Updating node state: waiting --> error
2020-10-16 10:37:33.778 7 DEBUG ironic_inspector.node_cache [-] [node: 14b4b5f0-71ec-4107-9f30-236abb705808 state waiting] Committing fields: {'state': 'error'} _commit /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:150
2020-10-16 10:37:33.789 7 DEBUG ironic_inspector.node_cache [-] [node: 14b4b5f0-71ec-4107-9f30-236abb705808 state error] Committing fields: {'finished_at': datetime.datetime(2020, 10, 16, 3, 37, 33, 778442), 'error': 'Introspection timeout'} _commit /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:150
2020-10-16 10:37:33.800 7 DEBUG ironic_inspector.node_cache [-] [node: fa623d6d-0241-4b3a-a04b-079f1e7ed847 state waiting] Attempting to acquire lock acquire_lock /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:105
2020-10-16 10:37:33.800 7 DEBUG ironic_inspector.node_cache [-] [node: fa623d6d-0241-4b3a-a04b-079f1e7ed847 state waiting] Successfully acquired lock acquire_lock /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:107
2020-10-16 10:37:33.801 7 DEBUG ironic_inspector.node_cache [-] [node: fa623d6d-0241-4b3a-a04b-079f1e7ed847 state waiting] Successfully released lock release_lock /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:119
2020-10-16 10:37:33.801 7 DEBUG ironic_inspector.node_cache [-] [node: fa623d6d-0241-4b3a-a04b-079f1e7ed847 state waiting] Executing fsm(waiting).process_event(timeout) fsm_event /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:207
2020-10-16 10:37:33.801 7 INFO ironic_inspector.node_cache [-] [node: fa623d6d-0241-4b3a-a04b-079f1e7ed847 state waiting] Updating node state: waiting --> error
2020-10-16 10:37:33.801 7 DEBUG ironic_inspector.node_cache [-] [node: fa623d6d-0241-4b3a-a04b-079f1e7ed847 state waiting] Committing fields: {'state': 'error'} _commit /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:150
2020-10-16 10:37:33.807 7 DEBUG ironic_inspector.node_cache [-] [node: fa623d6d-0241-4b3a-a04b-079f1e7ed847 state error] Committing fields: {'finished_at': datetime.datetime(2020, 10, 16, 3, 37, 33, 801202), 'error': 'Introspection timeout'} _commit /usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py:150
here is my journalctl :
(undercloud) [stack#tripleo ~]$ sudo journalctl -u openstack-ironic-inspector-dnsmasq
-- No entries --
(undercloud) [stack#tripleo ~]$ sudo journalctl -u openstack-ironic-inspector
-- No entries --
(undercloud) [stack#tripleo ~]$
here is my controller not getting dhcp and my result in undercloud.
thanks
and there is some dhcp request :
[stack#tripleo ~]$ sudo tcpdump -i any port 67 or port 68 or port 69
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
09:50:57.118995 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:50:57.118995 ethertype IPv4, IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:50:57.118995 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:51:05.193145 ethertype IPv4, IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:51:05.193153 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:51:05.193153 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:51:05.602879 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:05.602879 ethertype IPv4, IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:05.603323 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:09.667411 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:09.667412 ethertype IPv4, IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:09.667411 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:17.741535 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:17.741536 ethertype IPv4, IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:17.741535 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:42:a5 (oui Unknown), length 548
09:51:21.286506 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:51:21.286506 ethertype IPv4, IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
09:51:21.286871 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 98:f2:b3:2c:02:f5 (oui Unknown), length 548
10:15:53.427748 IP tripleo.localdomain.52678 > tripleo.localdomain.tftp: 47 RRQ "map-file" octet tsize 0 blksize 512 timeout 3
and here is my undercloud.conf :
[stack#tripleo ~]$ sudo cat undercloud.conf | grep -v "^#" | grep -v "^$" [DEFAULT]
certificate_generation_ca = local
generate_service_certificate = true
local_interface = eno2
local_ip = 192.168.35.1/24
undercloud_admin_host = 192.168.35.2
undercloud_enable_selinux = true
undercloud_hostname = tripleo.undercloud
undercloud_public_host = 192.168.35.3
[ctlplane-subnet]
cidr = 192.168.35.0/24
dhcp_end = 192.168.35.20
dhcp_start = 192.168.35.5
gateway = 192.168.35.1
inspection_iprange = 192.168.35.25,192.168.45.80
[stack#tripleo ~]$
just info if I deploy a tripleo baremetal with 1 undercloud, 1 controller, and 1 compute.and for the mac address controller is 98: f2: b3: 2c: 02: f5 and compute is 98: f2: b3: 2c: 42: a5
I've tried to turn off firewall and selinux but it had no effect and error was still same