Zorin OS firewall

HI,

Quick one, I am not able to open any port to access my Zorin machine (OS 17).
I have used firewall settings, local port 11434 (for ollama) works fine (local:11434) , however when I try to access it from the machine using its IP or from the outside it refuses to connect 192.169.1.x:11434.

What am I missing here ?

Thanks,
Dejan

The default policy for incoming requests is to block them. You probably need to setup a rule for that. Can you share your configuration?

From the applications menu: Firewall Configuration -> Rules.

Or, if you prefer from the command line:

sudo ufw status verbose

Here it is

Logging: on (low)
Default: allow (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To Action From


192.168.1.28 11434 ALLOW IN Anywhere
11434 ALLOW IN Anywhere
11434 (v6) ALLOW IN Anywhere (v6)

11434 ALLOW OUT Anywhere
11434 (v6) ALLOW OUT Anywhere (v6)

How are you running Ollama, through Docker? Can you share the output of:

ss -ntlp | grep 11434

ollama is just installed, no docker

LISTEN 0 4096 127.0.0.1:11434 0.0.0.0:*

Thanks,
D

1 Like

All right, just guessing if it was due to Docker, but it amounts to the same thing in this particular case anyway. The issue is that the Ollama process is listening on port 11434, but more specifically on the localhost interface. This means that it doesn't communicate with the actual, physical network interface(s) in your computer to the outside world.

Your options:

  1. Instruct Ollama to listen to all or some interfaces. How to do this depends on how the program works. As I'm not familiar with it, I can't really say.

  2. Create a new rule for the firewall to allow routing incoming connections on a specific interface meant for localhost. Since you are already using a firewall, this is probably better:

    sudo ufw route allow in on any out on lo from any to any
    

This is a bit generic, but give it a try first and see if it works.

1 Like