Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2020 20:24:57 +0200
From:      Jacques Foucry <jacques+freebsd@foucry.net>
To:        freebsd-questions@freebsd.org
Subject:   mosh, jail and pf
Message-ID:  <20200913182457.GD76929@mithril>

next in thread | raw e-mail | index | archive | help
Hello Experts,

I would like to use mosh in order to keep some ssh connexion even if close my
laptop.

mosh is installed on a jail and ssh is listen on port 4243

I tried, from my laptop 

`mosh --port 60000 --ssh "ssh -t -t -p4243" -- host ssh -t -t jail

It does not work and the error is:

```
mosh did not make a successful connection to ww.xx.yy.zz:60000.
Please verify that UDP port 60000 is not firewalled and can reach the server.

(By default, mosh uses a UDP port between 60000 and 61000. The -p option
selects a specific UDP port number.)
[mosh is exiting.]```

Looks like a `pf` problem, I need to open the 60000:61000 port range.

So I read the pf man page and saw that range are define with a colom:

``Port 2000:2004
                       means ‘all ports ≥ 2000 and ≤ 2004’, hence ports 2000,
                                              2001, 2002, 2003 and 2004.```

So I defined:

`mosh_port = 60000:61000`

and the rule:
`

But nothing works.

So I need your help or advices to configure, I suppose, `pf` to make mosh
working for contacting my jails.

Thanks in advance

-- 
Jacques Foucry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200913182457.GD76929>