CentOS 8 spoofing MAC address

jrshaw

New Member
Sep 7, 2019
19
1
3
33
Hi All,

I understand CentOS8 has only been out a few months, I'm pretty much having issues with my C8 VM on Proxmox, so I am wondering if Proxmox is capable of supporting CentOS 8.

Its more down to buggy vNIC then anything, so I have a C8 VM on the latest version of Promox and this has an external and internal NIC. Now, everything is setup fine and working correctly but I have found an issue.

On the VMs hardware, both the internal and external NIC have different MAC addresses, when logging in to the VM doing ip a, also shows the NICs have different MAC addresses. But from a Windows box doing an IP scan, it shows both the internal IP and External IP on the Centos 8 VM, using the same MAC address, which is strange, I have set both NICs HWADDR in the configs also to try and force the different MAC addresses through but nothing!

Its strange though because the moment I do ifup ens18, on the VM everything works.

Now I can only assume CentOS8 is buggy or its just not fully tested and functional with Proxmox just yet. But thought I would give it a post see if anyone more familiar with Proxmox has an idea.
 
Based on just what you posted, I don't think CentOS 8 is buggy nor Proxmox VE 5/6 support for it. In Linux (all distributions based on the kernel), IP addresses belong to the host (physical/VM/CT) -- not the NIC. This behavior is different than other operating systems.

So, on your CentOS 8 VM, what is the output of sysctl net.ipv4.conf.all.arp_ignore ? I suspect it will be: net.ipv4.conf.all.arp_ignore = 0 .

From the Linux ip-sysctl documentation we have the following:
Code:
arp_ignore - INTEGER
    Define different modes for sending replies in response to
    received ARP requests that resolve local target IP addresses:
    0 - (default): reply for any local target IP address, configured
    on any interface
    1 - reply only if the target IP address is local address
    configured on the incoming interface
    2 - reply only if the target IP address is local address
    configured on the incoming interface and both with the
    sender's IP address are part from same subnet on this interface
    3 - do not reply for local addresses configured with scope host,
    only resolutions for global and link addresses are replied
    4-7 - reserved
    8 - do not reply for all local addresses

    The max value from conf/{all,interface}/arp_ignore is used
    when ARP request is received on the {interface}

Thus, if you set sysctl net.ipv4.conf.all.arp_ignore=1 and repeat your scan, do you get the results you expected?
 
  • Like
Reactions: jrshaw
Ah, thank you, sorry I haven't replied for a while! Been a hectic week, if you do celebrate it, i hope you had a good xmas and new year.

Anyway, back to the question, I tried your suggestion but it just reverts back to 0, so I tried changed the file itself from 0 to 1 and still it reverts back.

I got a little annoyed with it in the end and sacked it off and went back to CentOS7, which is a new build VM and this is also doing the same now. I have never had this problem before and I have had the server with Hetzner for at leas 5-6 months now lol.

Meh, I'll keep searching around as well and leave this open here see if any more ideas are posted, I will try this on the C7 box now though see if it works.
 
Ah, thank you, sorry I haven't replied for a while! Been a hectic week, if you do celebrate it, i hope you had a good xmas and new year.

Anyway, back to the question, I tried your suggestion but it just reverts back to 0, so I tried changed the file itself from 0 to 1 and still it reverts back.

I got a little annoyed with it in the end and sacked it off and went back to CentOS7, which is a new build VM and this is also doing the same now. I have never had this problem before and I have had the server with Hetzner for at leas 5-6 months now lol.

Meh, I'll keep searching around as well and leave this open here see if any more ideas are posted, I will try this on the C7 box now though see if it works.

So I just tested it on my C7 box, rebooted and this also just reverts back to 0.....

EDIT: I have done some further testing, I have used both CentOS7 builds 1810 and 1908, and both are doing the same as the CentOS8 box, funnily enough, my Windows box isn't affected by this, nor is my Opnsense firewall running on FreeBSD after rebooting both of these. At the hardware level, the firewall is switched off, and so is Proxmox internal firewalls switched off (Both DC and Proxmox levels).
 
Last edited:
I'm wondering if I may of fooked up somewere, I think I was on quite an old kernel version:

The following packages will be REMOVED:
pve-kernel-5.0.21-1-pve

And did a straight upgrade just before this post lol I do remember that, can an upgrade from that kernel to latest version screw things up?
 
On CentOS, simply execute the following as 'root' to set the desired behavior on every boot:
Bash:
echo "net.ipv4.conf.all.arp_ignore = 1" >>/etc/sysctl.d/local.conf
 
Sorry, I did forget to mention, I did try that. So, I have rebooted my entire server and now can't access the Proxmox GUI, or any my VMs, only Proxmox through CLI hahahahaha.

It really isn't my day today now!

EDIT: Hetzner do not provide an up to date version, I have just done a fresh install and released its 4.x version, so me running a full upgrade to the latest one may of corrupted something I believe.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!