<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi all,<br></div>On my phone SSH listens on all interfaces, I am not 100% sure if the default jolla setup also runs like this since I have NielDKs' openssh packages installed.<br><br></div>Either way this brings up the interesting question of how to limit SSH to listen only on local interfaces (USB, bluetooth and WiFi - where the last one may be network dependent).<br><br></div>My first instinct was to change the ListenAddress, the problems with that are (from the top of my head):<br></div>- One would need to list all the possible <a href="http://192.168.0.0/16">192.168.0.0/16</a> addresses the phone can take for the different connection types.<br></div>- There is no way to guarantee that a cellular operator won't decide for some weird reason to use <a href="http://192.168.0.0/16">192.168.0.0/16</a> instead of <a href="http://10.0.0.0/8">10.0.0.0/8</a><br></div>- A WiFi you connect to could have <a href="http://10.0.0.0/8">10.0.0.0/8</a>, <a href="http://192.168.0.0/16">192.168.0.0/16</a> or even <a href="http://172.16.0.0/12">172.16.0.0/12</a> and there is no telling ahead of time which address the phone will have.<br><br></div>So this leaves an, I think, interesting question: how do we on the one hand allow SSH access while on the other hand preventing access from GSM/3G/4G?<br></div><br>The obvious solution seems to be an iptables/nftables rule linked to the interface of cellular internet which prevents access, iptables -L shows me the phones' table is currently completely empty, which may not be the best of ideas....<br><br></div>Suggestions?<br><br></div>Regards,<br></div>Eli<br></div>