SpatiumPortae / portal

Portal is a quick and easy command-line file transfer utility from any computer to another 🌌 ✨
https://portal.spatiumportae.com
MIT License
1.39k stars 35 forks source link

[bug] Firewall rules are missing (either in the code and in the doc) #129

Closed DodoLeDev closed 11 months ago

DodoLeDev commented 11 months ago

Describe the bug When I use portal on a firewall-enabled computer, I have absolutely no clues about which ports I have to open in order to make portal working

To Reproduce Steps to reproduce the behavior:

  1. Install ufw or firewalld and enable it
  2. Install portal
  3. Without any firewall modification, try to use portal
  4. In my case, I face those errors: lookup localhost on 1.1.1.1:53: no such host on the sender side, and failed to get reader: failed to read frame header: EOF on the receiver side

Expected behavior Portal should work out-of-the-box, by either adding custom rules during installation, or by showing a warning during the first use

Platform / Portal version (please complete the following information):

Additional context Strangely, this problem only occurred for me between two PCs with firewalls. When one of them hasn't this protection or has correct firewall rules applied, transfers works perfectly

DodoLeDev commented 11 months ago

I already tried to open port 53. Same error

So I looked into the firewall log:

[ 2009.323605] [UFW BLOCK] IN=wlp0s2 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx SRC=xxx.xxx.xxx.xxx DST=xxx.xxx.xxx.xxxx LEN=91 TOS=0x00 PREC=0x00 TTL=53 ID=12368 DF PROTO=TCP SPT=993 DPT=59460 WINDOW=506 RES=0x00 ACK PSH URGP=0

And tried to allow port 59460 over tcp: same error

DodoLeDev commented 11 months ago

Nevermind, it's purely my fault! 😅 This error is thrown when the system is unable to resolve localhost domains. It was my case: /etc/hosts was empty.

I fixed this problem and now everything works flawlessly! 👍🏼