| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
The host's NAT rules are for connections to the host, but they got
applied to the guests', too: e.g. a redirect of port 11423 to the host's
sshd turned a guest's allowed connection to some address's port 11423
into one to the host, which got rejected ("No route to host").
Our prerouting chain now runs before the host's, and gives everything
from fcbr0 a NAT that changes nothing. A connection only ever gets one
NAT, so the host's rules don't touch it any more.
|
| |
|
|
|
|
|
|
|
|
| |
Rules like tcp://192.0.2.7:22 or udp://192.0.2.0/24:5000-5100 in a user's
egress rules (managed with fc-egress as before) go into the nftables set
allow_USER, and connections from that user's guests that match get
forwarded (NATed to the host's address), or let in, if they're for one
of the host's addresses. fcbr0-firewall fills the sets whenever a
user's rules change, and after nftables reloads. Forwarding needs
net.ipv4.ip_forward, which networking.nat used to set.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The host module takes users = { NAME = TAPS; ... } instead of a single
user: each user gets that many taps, and rules of their own, in
/var/lib/fc-egress/USER/allowed, managed with fc-egress as before.
The proxy tells whose a guest is by its address: each tap has a fixed
one, handed out by dnsmasq by MAC address (derived from the tap's number,
as the run script does), and the bridge drops anything a guest sends from
another address. The decrypting server gets a socket per user, as it
can't see the guest's address. The run script only takes the user's own
taps.
|
|
|
egress.lua goes along. The host now imports it as
(import .../modules/host { user = ...; }).
|