I'm setting up a firewall for a connected device running Linux. It has a wired/wireless interface to connect to the internet in general and to open a VPN tunnel to an external server. For security reasons, outgoing traffic should be firewalled as well.
The goal: The network interface should be firewalled to allow only some traffic that originates from this machine, i.e. it should isolate the VPN from the actual network interface. A user in the same VPN should not be able to use this machine as a gateway to other external services. As far as I understand, this can be realized by setting the FROM part of the firewall rule to the local interface address.
The question: How can I specify the FROM address to refer to the local interface if the actual address is obtained via DHCP?
Thank you!
Best regards, Philipp