Score:0

connection to service with disabled firewall fails

cn flag

i am trying to access a service on my ubuntu server 20.04

the following command on the local machine:

nc -zv 127.0.0.1 9256
Connection to 127.0.0.1 9256 port [tcp/*] succeeded!

the same command from another machine in the same local network:

nc -zv 192.168.1.132 9256
nc: connect to 192.168.1.132 port 9256 (tcp) failed: Connection refused
  • The machine is reachable via ping & ssh.
  • It is a virtual machine with pass-through network adapter
  • commant sudo ufw disable was executed
  • sudo tcpdump 'port 9256' does capture incoming request

What else am I missing?

Update: I found the service is listening to:

tcp    LISTEN 0    128    127.0.0.1:9256    0.0.0.0:*

I think this is the issue. Do I configure something like that in software or in ubuntu itself?

Alejandro avatar
mz flag
Did you try adding the port to `ufw`?
julian bechtold avatar
cn flag
sudo ufw status Status: inactive, and yes, i added the port even still
Alejandro avatar
mz flag
You need to enable it in order to work `sudo ufw enable`, if you add the port to `ufw` but disable it, it will not work.
FedKad avatar
cn flag
You should modify the software parameters to listen to the real IP address. Please share the name of the software who listens, so that you may get more help on configuration
julian bechtold avatar
cn flag
its the chia-blockchain wallet. normally you dont want wallet ports listened publicly but this is for a test-environment (which I want to access from my local development machine)
Alejandro avatar
mz flag
If you want to just allow a specific ip address so the port is not publicly available you can add that to ufw. `sudo ufw allow from 192.168.1.10 to any port 1337`. Make sure ufw is enabled.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.