I recently installed the last version of FreeNAS, but I am having issues setting the network. I have an OVH server with Proxmox VE Platform; inside I create a Virtual Server with one of the IP Failover attached to the MAC address assigned from the OVH Console. Now I use the configuration that they provide in the Network OVH Guide, and also examples posted in this forum. Also, I try to do it in the same way that I use in other FreeBSD servers, but in this case, every time that tries to do the same, when I reboot the configuration disappears.
I will provide the steps that I was doing below, but I just want to know if you know a better way to set the network without using the FreeNAS GUI and make persistent this configuration.
This is the setting that OVH Provide:
FreeBSD 12.0
Open a terminal on your virtual machine. Once connected, open the virtual machine’s network configuration file, which is located in /etc/rc.conf. Edit the file so that it includs the configuration below (please remember to replace our variables with your own values. In this example, the inteface name is em0; Adjust if necessary.):
ifconfig_em0="inet FAILOVER_IP netmask 255.255.255.255 broadcast FAILOVER_IP"
static_routes="net1 net2"
route_net1="-net GATEWAY_IP/32 -interface em0"
route_net2="default GATEWAY_IP"
This also what I tried, I used this configuration in regular FreeBSD and pfSense, and work perfectly.
route add -net 198.x.x.254/32 -ifcace em0
route add default 198.x.x.254
Now I create this to run this automatic in the initialization.
create a script ex. route.sh in /usr/local/etc/rc.d/
#!/bin/sh
route add -net 198.x.x.254/32 -ifcace em0
route add default 198.x.x.254
After this make an executable:
chmod +x /usr/local/etc/rc.d/route.sh
Please if you know a way yo make this to work, I am fighting with this for days.
Thanks in advance
I will provide the steps that I was doing below, but I just want to know if you know a better way to set the network without using the FreeNAS GUI and make persistent this configuration.
This is the setting that OVH Provide:
FreeBSD 12.0
Open a terminal on your virtual machine. Once connected, open the virtual machine’s network configuration file, which is located in /etc/rc.conf. Edit the file so that it includs the configuration below (please remember to replace our variables with your own values. In this example, the inteface name is em0; Adjust if necessary.):
ifconfig_em0="inet FAILOVER_IP netmask 255.255.255.255 broadcast FAILOVER_IP"
static_routes="net1 net2"
route_net1="-net GATEWAY_IP/32 -interface em0"
route_net2="default GATEWAY_IP"
This also what I tried, I used this configuration in regular FreeBSD and pfSense, and work perfectly.
route add -net 198.x.x.254/32 -ifcace em0
route add default 198.x.x.254
Now I create this to run this automatic in the initialization.
create a script ex. route.sh in /usr/local/etc/rc.d/
#!/bin/sh
route add -net 198.x.x.254/32 -ifcace em0
route add default 198.x.x.254
After this make an executable:
chmod +x /usr/local/etc/rc.d/route.sh
Please if you know a way yo make this to work, I am fighting with this for days.
Thanks in advance