Address for swarm connect is not using port 4001

I tried connecting two peers from different public ip addresses but failed. I have successfully connected them before but this time I noticed that the port is different, 7863 instead of 4001

ipfs id:
66YZ/C15/HtjTPAgMBAAE=",
“Addresses”: [
“/ip6/::1/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEgXxjanorKVvai
sJY5cQ”,
“/ip4/169.254.136.243/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEg
XxjanorKVvaisJY5cQ”,
“/ip4/169.254.139.192/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEg
XxjanorKVvaisJY5cQ”,
“/ip4/192.168.43.56/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEgXx
janorKVvaisJY5cQ”,
“/ip4/169.254.224.8/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEgXx
janorKVvaisJY5cQ”,
“/ip4/192.168.56.1/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEgXxj
anorKVvaisJY5cQ”,
“/ip4/127.0.0.1/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEgXxjano
rKVvaisJY5cQ”,
“/ip4/113.210.110.180/tcp/7863/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEg
XxjanorKVvaisJY5cQ”
],
“AgentVersion”: “go-ipfs/0.4.22/”,
“ProtocolVersion”: “ipfs/0.1.0”
}


Is my firewall configured correctly?

it seems like the port is random, but there is no service other than IPFS using port 4001. IPFS itself occupying port 4001? I am confused

7863 is probably the NAT port assigned to IPFS connections by the router.

If your port is 4001 and that is open, you should be able to manually connect to /ip4/113.210.110.180/tcp/4001/ipfs/QmQKkiYzD8JnuK9bzw3RW65qEsEg XxjanorKVvaisJY5cQ. IPFS does not automatically advertise this port unless it sees 3 successful connections to it. A workaround is to set the Announce variable in the config to explicitly hardcode it.

ipfs swarm connect still fails.

I set the Announce variable in the config file like this:

"Addresses": {
"API": "/ip4/127.0.0.1/tcp/5001",
"Announce": ["/ip4/113.210.182.118/tcp/4001"],
"Gateway": "/ip4/127.0.0.1/tcp/8081",
"NoAnnounce": [],
"Swarm": [
  "/ip4/0.0.0.0/tcp/4001",
  "/ip6/::/tcp/4001"
]

},

now the ipfs id:

Firewall setting on the node I want to connect:

Firewall setting on the Azure virtual machine I used to connect the node:

Azure firewall setting:

Need help

Hmm I can only say that the port seems filtered/unreachable from the outside.

I think my IP is correct

113.210.182.118:4001 is not reachable for me nor for your other ipfs daemon. This looks like a connectivity issue you need to figure out with Azure/Windows.