Configure Networking in Fedora 28 OVH Proxmox
OVH have special networking requirement. First you need to login OVH and create vMAC for your IP address. Now create VM in Proxmox, during VM creation, specify this vMAC address under Network > MAC.
Once your VM is installed, you don’t have network access. Login to the server using Proxmox Console.
Run following commands
1 2 3 |
ip addr add FAILOVER_IP dev ens18 ip route add GATEWAY_IP dev ens18 ip route add default via GATEWAY_IP dev ens18 |
Replace following in above commands
FAILOVER_IP = IP address of your Virtual Machine.
GATEWAY_IP = This is gateway IP addres. This is IP address of your host machine (the server on which proxmox installed). Replace last digit with 254. For example, if your servers main IP is 123.123.123.142, then use 123.123.123.254 as gateway.
Here is an example
1 2 3 |
ip addr add 158.69.138.120 dev ens18 ip route add 192.95.29.254 dev ens18 ip route add default via 192.95.29.254 dev ens18 |
At this point, you will be able to login to server using SSH. You may not able to ping outside, for this, you need to edit /etc/resolv.conf and add nameserver entry.
1 |
vi /etc/resolv.conf |
Add
1 |
nameserver 8.8.8.8 |
To make it permanant, edit
1 |
vi /etc/sysconfig/network-scripts/ifcfg-ens18 |
Find
1 |
BOOTPROTO=dhcp |
Replace with
1 2 3 4 5 |
BOOTPROTO=static IPADDR=FAILOVER_IP GATEWAY=GATEWAY_IP HWADDR=MY:VI:RT:UA:LM:AC DNS1=1.1.1.1 |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@ip120 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens18 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static IPADDR=158.69.138.120 GATEWAY=192.95.29.254 HWADDR=02:00:00:46:f4:52 DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens18 UUID=cf4c9d14-92ec-3475-94e2-797b405ac516 ONBOOT=yes AUTOCONNECT_PRIORITY=-999 DEVICE=ens18 [root@ip120 ~]# |
For routung, create
1 |
vi /etc/sysconfig/network-scripts/ifcfg-ens18-route |
1 2 |
GATEWAY_IP - 255.255.255.255 ens18 default GATEWAY_IP |
Example
1 2 3 4 |
[root@ip120 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens18-route 192.95.29.254 - 255.255.255.255 ens18 default 192.95.29.254 [root@ip120 ~]# |