[Please excuse the lack of threading. I just switched on email
subscription and that prevents "reply" from working in the web interface
and it won't work with a non-GUI MUA]
Thanks Eric.
Eric asked:
| On Fri, Jul 31, 2020 at 04:11:51PM -0000, D. Hugh Redelmeier wrote:
|
| > I had tried a couple of different rich rules with negative priority,
| > hoping that they would apply before masquerading, but they didn't seem
| > to. I might have made some mistakes in formulating the rule.
| >
| > From output of sudo firewall-cmd --info-zone=external
| > services: ... ssh
| > masquerade: yes
| > rule priority="-10" family="ipv4" destination address="my.net.ip.addr/24" drop
| >
| > Even with this rule, I could ssh directly into my LAN from outside.
| > Should that not have been blocked by my rich rule?
|
| No - the above will _not_ block SSH outside --> LAN. I suspect it's only
| being allowed due to the issue I linked in my last email [1]. What is
| your LAN zone? trusted? internal?
My LAN is in zone "internal".
The issue you linked (a possibly bogus free pass) applies only to
"trusted" as far as I can tell from a quick read.
| I think misunderstood what you wanted from your original email.
More than likely I have a bogus model and thus speak in confusing
ways.
================
In a very abstract level, I like firewalld because the configuration
is specified in a declarative way. Up to, but not including, rich
rules. This should make configuring firewalls simpler, clearer, and
less error prone.
That puts a responsibility on the firewalld crew. It should not be
assumed that users are as sophisticated as iptables users.
I think that the clearest idea of masquerading is or should be:
- there is a pool of non-routable addresses used on the local system
- there is one routable address used to talk to the wide internet
- the masquerade multiplexes/demultiplexes traffic from/to a local
address to/from the routable address.
Almost all naive users would assume that if one of the non-routable
addresses were on a packet on the global side, it should be dropped or
rejected.
My experiments seem to show that this is not happening. From outside
my LAN, I could SSH into the LAN (not just the gateway).
I tried (unsuccessfully) to implement this policy with a rich rule.
================
My own configuration is quite odd. I've accommodated it for 20 years
using iptables and its precursors:
- my local address are, in fact, legitimate global addresses
- I want to carve up the subnet so that one portion is masqueraded and
another portion is not. The masqueraded portion include machines
that haven't been hardened.
- the split is not 50-50. The natural way to split is the use address
ranges. The efficient way is to use overlapping subnets, with
priority to the smaller.
I don't expect firewalld to cater to my odd case. But it would be
nice if happened to be possible.