3

I'm using pulseaudio-dlna+pavucontrol to direct sound output from my laptop (192.168.2.159) to my yamaha stereo (192.168.2.160) This only works when I disable ufw with sudo ufw disable

I struggle to find the right rule to allow that specific traffic.

sudo tail -f /var/log/ufw.log

shows block messages like:

Apr 21 20:40:50 foo kernel: [ 5349.911161] [UFW BLOCK] IN=wlo1 OUT= MAC=01:00:5e:7f:ff:ff:ff:ff:ff:65:c3:04:08:00 SRC=192.168.2.160 DST=239.255.255.250 LEN=204 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=UDP SPT=40760 DPT=51200 LEN=184

As you can see I already added various rules without the desired effect, which I want to remove again when I found the right config:

sudo ufw status verbose

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

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW IN    192.168.2.0/24            
80/tcp                     ALLOW IN    192.168.2.0/24            
80/udp                     ALLOW IN    192.168.2.0/24            
1900/udp                   ALLOW IN    192.168.2.0/24            
1900/udp                   ALLOW IN    239.255.255.0/24          
1900/udp                   ALLOW IN    Anywhere                  
3689                       ALLOW IN    Anywhere                  
1901/udp                   ALLOW IN    192.168.0.0/24 1900/udp   
51200/udp                  ALLOW IN    192.168.0.0/24 40760/udp  
8080/udp                   ALLOW IN    192.168.0.0/24 40760/udp  
40760/udp                  ALLOW IN    192.168.0.0/24 51200/udp  
51200/udp                  ALLOW IN    239.255.255.0/24 40760/udp
8080/tcp                   ALLOW IN    192.168.2.0/24 3393/tcp   
40760/udp                  ALLOW IN    239.255.255.0/24 51200/udp
1900/udp (v6)              ALLOW IN    Anywhere (v6)             
3689 (v6)                  ALLOW IN    Anywhere (v6)             

40760/udp                  ALLOW OUT   239.255.255.0/24 51200/udp
51200/udp                  ALLOW OUT   239.255.255.0/24 40760/udp

1 Answer 1

2

I was able to find the right rules. The application iftop is handy to see which ports and addresses see traffic.

ufw disable
# Now start playback and watch the traffic with:
iftop -i wlo1 -N -n -P

These rules allowed me to have ufw active and stereo playing:

ufw allow proto udp from 192.168.2.0/24 to any port 8080   
ufw allow proto udp from 192.168.0.0/24 port 1900 to any port 1901
ufw enable

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .