0

I use gupnp-av-cp application to play, pause, volume up/down, stop in short to control media buttons on TV which is connected to local area network. But When I enable ufw firewall then it fails to reach TV.

I added a rule to /etc/ufw/applications.d/gupnp-av-cp

 [gupnp-av-cp]
 title=Media Controller
 description=Local Area Media
 ports=80,60999/tcp

reloaded ufw

 sudo ufw reload

but it doesn't work properly.

I don't know which port ranges to allow

kenn
  • 5,074
  • 12
  • 55
  • 94

2 Answers2

2

As far as I'm informed, you have just given ufw the information about a protocol. But now you have to enable it. You can perform this with the following command:

ufw app update gupnp-av-cp
ufw allow gupnp-av-cp

Then you can reload ufw and it should work.

Also consider looking at: how do you create an app profile for ufw?

MelcomX
  • 93
  • 7
  • I get `ERROR: Could not find a profile matching 'gupgp-av-cp'` – kenn May 11 '19 at 14:25
  • 2
    @kenn I think the poster just mis-read your app name (swap `gupgp-` for `gupnp-`) – steeldriver May 11 '19 at 15:13
  • Yes, I mistyped it. It should be `gupnp`, not `gupgp`. (I corrected it in the answer... – MelcomX May 11 '19 at 15:18
  • @steeldriver Thank you for your attention. I feel dumb, I also retyped it many times and supposedly rechecked the spelling. I think I stop to trust in my perception. Anyway, I allowed `gupnp-av-cp`, when I restart `gupnp-av-cp` it can not access to local TV. I need to add correct ip port ranges for `tcp` and `udp` – kenn May 11 '19 at 15:35
0

In my case I have to apply the following steps:

I added a rule to /etc/ufw/applications.d/gupnp-av-cp

[gupnp-av-cp]
title=Media Controller
description=Local Area Media
ports=80:60999/tcp|1900:60999/udp

Then

sudo ufw allow  from 192.168.1.110/24 to any app gupnp-av-cp 

Finally

sudo ufw reload

You also need to enable UPNP in your modem. 192.168.1.110 is local ip address of my computer.

kenn
  • 5,074
  • 12
  • 55
  • 94