Azure Linux VM : Internet access via 2nd NIC

Omar 0 Reputation points
2023-07-06T14:15:39.49+00:00

hi,

I attached a 2nd NIC to my Linux VM, on the same subnet. Internal IP's of both NIC's are following:

eth0 : 10.0.1.4
eth1 : 10.0.1.5

Both NIC's have public IP's assigned. Problem is that we can't ping any public server (e.g. bing.com) via eth1. Internet is accessible via eth0 only.

We have tried adding default route via following command, but it didn't help:

route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.1.1 dev eth1

Please advise how to configure 2nd NIC to have Internet access via eth1.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,772 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.