Bitcoin Forum
July 22, 2026, 12:56:06 AM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I expose a Python P2P blockchain node running on Android behind CGNAT?  (Read 18 times)
Francesco Ferraro (OP)
Newbie
*
Offline

Activity: 1
Merit: 0


View Profile WWW
July 21, 2026, 11:18:29 AM
 #1


Hi everyone,

I'm building a blockchain as a hobby and learning project.

The node is written in Python (Flask) and runs entirely on Android using Termux.

Everything works correctly on a local network:

Block mining

Transaction validation

UTXO management

Block synchronization

Peer-to-peer communication (LAN)


The only problem is making the node publicly reachable.

My mobile carrier uses CGNAT, so I cannot expose port 5000 directly.

So far I've tried:

DuckDNS

LocalToNet


DuckDNS doesn't work because I don't have a public IP.

LocalToNet creates a tunnel, but it displays a warning/interstitial page before forwarding traffic. That breaks API communication between peers.

My node exposes endpoints such as:

GET  /info
GET  /chain
POST /receive_block
POST /receive_tx
POST /submit_block

Because of the warning page, other nodes cannot communicate with these endpoints normally.

My goal is not to build a centralized network.

I only need a reliable bootstrap (seed) node so new peers can discover the network.

Since I'm developing entirely on an Android phone with mobile data, I'd like to know what the best approach would be.

Would you recommend:

A free VPS?

FRP (Fast Reverse Proxy)?

Cloudflare Tunnel?

WireGuard?

Another CGNAT-friendly solution for P2P applications?


I'd really appreciate advice from anyone who has solved a similar problem.

Thank you.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!