mobile internet connection doesn't allow INPUT connection due the fact your public ip is shared with other and all outgoing traffic is natted by the provider. sometimes may happen you have only a mobile connection and need to serve an http, https service directly from your computer. there are two problems:
- have a INPUT connection
- sign your letsencrypt https certificate
all of these solve by buying a basic online server, personally I found comfortable with DigitalOcean droplets ones: for a 1cpu, 25GB ssd disk ( montly cost equiparable to have 1 static ip address from service provider )
- on the online server set
sshd_config- to allow
GatewayPorts yesto allow bind of non-local addresses through reverse ssh - to maintain ssh keep alive
ClientAliveInterval 120andClientAliveCountMax 252800( 365 days ) - then restart ssh sevice
- to allow
- connects through ssh tunnel your 80,443 services
ssh -R 80:10.10.0.18:80 -R 443:10.10.0.18:443 online- where 10.10.0.18 for example is your local nginx server and
onlineis the name of your online server configured into~/.ssh/config
- connects the online server so that local 80,443 ports exports there to allow letsencrypt validate certs
ssh -R 80:127.0.0.1:80 -R 443:127.0.0.1:443 online
- renew certs as usual
someone will ask himself if having an online server isn't already enough to serve required service creating an https certs from there, the answer is yes, but, if paranoid you want data flows through an https encryption to/from your local disk with a certificate which private key is in your local server, thus the above procedure.