VLC (Solved)

gillsman

Member
Joined
Jan 29, 2019
Messages
97
Reaction score
37
Credits
787
I am trying to cast media from my computer to a chromecast that's connected to my tv using VLC, when I click on playback / Rendering I see my Chromecast & select it, I then select the relevant media file(s) & the title appears on the tv but it will not play, if I I disable my firewall (UCFW) & try again it works perfectly so the firewall is obviously blocking VLC.
Here's the problem, I don't have a clue how to add a rule to the firewall, I spent all morning searching the internet for an answer & found nothing. I could of course turn the firewall off each time I wish to cast but I don't want to take that risk.
I know nothing about iptables or whatever they're called. Can anyone help me with an easy to follow way of allowing VLC (safely) through the firewall please.
Many Thanks.
 


D

Deleted member 108694

Guest
Do you have GUFW installed - it is the graphical Interface for UFW (Uncomplicated Firewall) If not add the GUFW interface which can be had through the Synaptic Package Manager.

from the terminal run
Code:
netstat -nlp
this will tell you which port is being used then you can allow that port in GUFW
 
OP
G

gillsman

Member
Joined
Jan 29, 2019
Messages
97
Reaction score
37
Credits
787
Do you have GUFW installed - it is the graphical Interface for UFW (Uncomplicated Firewall) If not add the GUFW interface which can be had through the Synaptic Package Manager.

from the terminal run
Code:
netstat -nlp
this will tell you which port is being used then you can allow that port in GUFW
This is what I get from that command, unfortunately it's all double dutch to me
$ netstat -nlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:6341 0.0.0.0:* LISTEN 7398/megasync
tcp 0 0 127.0.0.1:6342 0.0.0.0:* LISTEN 7398/megasync
tcp 0 0 0.0.0.0:8010 0.0.0.0:* LISTEN 376550/vlc
tcp6 0 0 :::8010 :::* LISTEN 376550/vlc
udp 0 0 127.0.0.53:53 0.0.0.0:* -
udp 0 0 224.0.0.251:5353 0.0.0.0:* 160167/slimjet --ty
udp 0 0 224.0.0.251:5353 0.0.0.0:* 160094/slimjet
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:54699 0.0.0.0:* -
udp6 0 0 :::52253 :::* -
udp6 0 0 :::5353 :::* -
raw6 0 0 :::58 :::* 7 -
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 32494 3743/cinnamon-sessi @/tmp/.ICE-unix/3743
unix 2 [ ACC ] SEQPACKET LISTENING 17135 - /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 102024 160094/slimjet /tmp/.org.chromium.Chromium.MjBgbJ/SingletonSocket
unix 2 [ ACC ] STREAM LISTENING 32113 3701/systemd /run/user/1000/systemd/private
unix 2 [ ACC ] STREAM LISTENING 32118 3701/systemd /run/user/1000/bus
unix 2 [ ACC ] STREAM LISTENING 32119 3701/systemd /run/user/1000/gnupg/S.dirmngr
unix 2 [ ACC ] STREAM LISTENING 32120 3701/systemd /run/user/1000/gnupg/S.gpg-agent.browser
unix 2 [ ACC ] STREAM LISTENING 32121 3701/systemd /run/user/1000/gnupg/S.gpg-agent.extra
unix 2 [ ACC ] STREAM LISTENING 32122 3701/systemd /run/user/1000/gnupg/S.gpg-agent.ssh
unix 2 [ ACC ] STREAM LISTENING 32123 3701/systemd /run/user/1000/gnupg/S.gpg-agent
unix 2 [ ACC ] STREAM LISTENING 27815 - /run/irqbalance//irqbalance666.sock
unix 2 [ ACC ] STREAM LISTENING 32124 3701/systemd /run/user/1000/pk-debconf-socket
unix 2 [ ACC ] STREAM LISTENING 32125 3701/systemd /run/user/1000/pulse/native
unix 2 [ ACC ] STREAM LISTENING 36544 7398/megasync /home/rick/.local/share/data/Mega
unix 2 [ ACC ] STREAM LISTENING 32225 - /run/user/1000/keyring/control
unix 2 [ ACC ] STREAM LISTENING 36545 7398/megasync /home/rick/.local/share/data/Mega
unix 2 [ ACC ] STREAM LISTENING 28771 - @/tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 31613 - /run/user/1000/keyring/pkcs11
unix 2 [ ACC ] STREAM LISTENING 32541 - /run/user/1000/keyring/ssh
unix 2 [ ACC ] STREAM LISTENING 17103 - /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 17105 - /run/systemd/userdb/io.systemd.DynamicUser
unix 2 [ ACC ] STREAM LISTENING 17115 - /run/lvm/lvmpolld.socket
unix 2 [ ACC ] SEQPACKET LISTENING 17119 - /run/systemd/coredump
unix 2 [ ACC ] STREAM LISTENING 17121 - /run/systemd/fsck.progress
unix 2 [ ACC ] STREAM LISTENING 17131 - /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 18437 - /run/systemd/journal/io.systemd.journal
unix 2 [ ACC ] STREAM LISTENING 24772 - /run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 28772 - /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 64047 - @/tmp/dbus-GX0QBQ6Oqo
unix 2 [ ACC ] STREAM LISTENING 31526 - /tmp/ssh-SmPLi62uRJ0C/agent.3743
unix 2 [ ACC ] STREAM LISTENING 32495 3743/cinnamon-sessi /tmp/.ICE-unix/3743
unix 2 [ ACC ] STREAM LISTENING 24774 - /run/avahi-daemon/socket
unix 2 [ ACC ] STREAM LISTENING 33051 5341/dbus-daemon @/tmp/dbus-hBo5xFrqOH
unix 2 [ ACC ] STREAM LISTENING 24776 - /run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 24778 - /run/uuidd/request
 
D

Deleted member 108694

Guest
Guess I should be more clear you have to have your VLC up and running and connected with Chromecast like you would normally then run the command I listed above - This should find the port it is using alternatively you can try what is below

open vlc > tools > preferences > select "all" (at the bottom) > stream output > sout stream > chromecast > HTTP Port = ????. I think it is 8010 which is default but you have to check

Then open gufw,
click "+" to add a new rule,
"Advanced" tab,
"Name" = VLC Chromecast
"Policy" = Allow,
"Direction" = Both
"Protocol" = Both
"To / Port" = <add your port number here>.
clicked on "Add" then "Close".

It is pretty much the same process when I connected HDHomeRun to watch TV through VLC on my laptop
 
Last edited by a moderator:
OP
G

gillsman

Member
Joined
Jan 29, 2019
Messages
97
Reaction score
37
Credits
787
Guess I should be more clear you have to have your VLC up and running and connected with Chromecast like you would normally then run the command I listed above - This should find the port it is using alternatively you can try what is below

open vlc > tools > preferences > select "all" (at the bottom) > stream output > stout stream > chromecast > HTTP Port = ????.

Then open gufw,
click "+" to add a new rule,
"Advanced" tab,
"Name" = VLC Chromecast
"Policy" = Allow,
"Direction" = Both
"Protocol" = Both
"To / Port" = <add your port number here>.
clicked on "Add" then "Close".

It is pretty much the same process when I connected HDHomeRun to watch TV through VLC on my laptop
Ok my apologies for being a bit thick, I will try this shortly & let you know how I got on, in the meantime thank you so much for your assistance & patience.
 
D

Deleted member 108694

Guest
Ok my apologies for being a bit thick, I will try this shortly & let you know how I got on, in the meantime thank you so much for your assistance & patience.
Not a problem it took me awhile to figure this out to when I connected HDHomeRun on my machine
 
OP
G

gillsman

Member
Joined
Jan 29, 2019
Messages
97
Reaction score
37
Credits
787
Ok my apologies for being a bit thick, I will try this shortly & let you know how I got on, in the meantime thank you so much for your assistance & patience.
OK so I've followed your instructions exactly, the HTTP port was 8010, I put these rules in as you said but the firewall said "No rules added" & when I looked in the logs it said
[25/11/20 15:49:11] Error running: /usr/sbin/ufw allow out from any to 8010 > ERROR: Bad destination address |

What have I done wrong here?
 

Attachments

  • Screenshot from 2020-11-25 15-54-00.png
    Screenshot from 2020-11-25 15-54-00.png
    29.2 KB · Views: 451
D

Deleted member 108694

Guest
Put 8010 on right side, left side is for IP, right side for port - here is mine for HDHomeRun which HDHomeRun uses multiports and UDP protocol - if you do not know which protocol it uses select Both or try one or the other
 

Attachments

  • Firewall.png
    Firewall.png
    34.9 KB · Views: 497
Last edited by a moderator:
OP
G

gillsman

Member
Joined
Jan 29, 2019
Messages
97
Reaction score
37
Credits
787
Cracked it, instead of putting those values in the advanced section I put them in the section "Simple"
this time the rules appeared so I started VLC again & bingo, it works.
Thank you Lord Boltar, couldn't have done that without your input.
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
6,969
Reaction score
5,809
Credits
45,515
You can edit your topic's title (VLC) to look like Solved.VLC

The site doesn't have a 'solved' button

Welcome to linux.org

Embarrassment is not part of the scene here. Ever.
 

Members online


Top