-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
==============Server side, firewall only open TCP 4001=========
$ ipfs version
ipfs version 0.4.15
$ ipfs id
"ID": [my vps ipfs id]
$ ipfs p2p listener open p2p-test /ip4/127.0.0.1/tcp/8081
{"Address":"/ip4/127.0.0.1/tcp/8081","Protocol":"/p2p/p2p-test"}
$ curl --socks5 127.0.0.1:8081 http://myip.ipip.net
IP:[my vps wan ip] amazon.com
==================Client side, symmetric NAT===========
$ ipfs version
ipfs version 0.4.15
$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
{"Address":"/ip4/127.0.0.1/tcp/10102","Protocol":"/p2p/p2p-test"}
$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
Error: listen tcp4 127.0.0.1:10102: bind: address already in use
$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
IP:[my vps wan ip] amazon.com
$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
curl: (7) Failed to connect to 127.0.0.1 port 10102: Connection refused
$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
{"Address":"/ip4/127.0.0.1/tcp/10102","Protocol":"/p2p/p2p-test"}
$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
IP:[my vps wan ip] amazon.com
$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
curl: (7) Failed to connect to 127.0.0.1 port 10102: Connection refused
$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
{"Address":"/ip4/127.0.0.1/tcp/10102","Protocol":"/p2p/p2p-test"}
$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
IP:[my vps wan ip] amazon.com
$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
curl: (7) Failed to connect to 127.0.0.1 port 10102: Connection refused
....
What a pity, TCP tunnel breaks after every request.