On Sun, Sep 04, 2022 at 09:42:34AM +0200, john doe wrote:
> On 9/4/2022 8:39 AM, Rand Pritelrohm wrote:

[...]

> >      #Then I have to enable routing
> >      echo '1' > /proc/sys/net/ipv4/ip_forward
> >      iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> > 
> 
> You are answering your own question, if you masquerade the MAC addr from
> the VM will not be seen upstream.

Only that NAT masquerades the IP address. It doesn't know anything
about MACs (as far as it is concerned there could be no MAC at all,
it wouldn't care).

The MAC disappears as soon as there is routing. You see the router's
MAC at the other side. No need to NAT.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to