Gateways and Routes, interface

Hello,

I am new with FreeBSD and a noob. I am searching information about the following items:

What is the equivalent command in FreeBSD for
echo 1 VPN >> /etc/iproute2/rt_tables and
Code:
nano /etc/network/interfaces
auto lo:1
        iface lo:1 inet static
        address 192.168.0.1
        netmask 255.255.255.255
It is for helping another moderator where a system is using FreeBSD.

Thanks
 
There are at least two things there that suggest it is not a FreeBSD system. What makes you think it is running FreeBSD?
 
In fact, we are using nas4free based on FreeBSD.
And we are searching the equivalent of this command as we need it in nas4free/FreeBSD.
The purpose is to authorize the Vpn connection only for one service, and the other services use the standard connection without vpn.
 
NAS4Free is a customized version of FreeBSD. The way they do this might be different from the way stock FreeBSD does it. Because of that, it is best to ask them, in their forums or mailing lists.
 
It's setfib(1) that handles multiple routing on FreeBSD. Something to keep in mind is that FreeBSD doesn't have the same underlying concept of sending from address x.x.x.x to destination y.y.y.y as in the case of multiple routing tables with Linux. Instead it's processes that must be explicitly bound to the FIB that you want them to run on. If you want the same service on multiple FIBs then multiple instances of the same service must be run.

A hypothetical setup for stock FreeBSD would be similar to this. You'll want to research the right way to accomplish the same thing given Nas4Free's customization.

Set 2 routing tables. You'll need to reboot after setting this tunable.
echo 'net.fibs=2' >> /boot/loader.conf

Assign the default route for that FIB for the VPN in /etc/rc.conf
Code:
static_routes="fib1default"
route_fib1default="default x.x.x.1 -fib 1"

Finally, set the service you want to use that FIB to use it in /etc/rc.conf. As an example.
Code:
nginx_fib="1"

More syntax guidance is in rc.conf(5).
 
Thanks for this information. I will investigate it.

Concerning this issue, I asked here because as Nas4Free is based on FreeBSD, he uses the same command. And your expertise can help us. Sure I have already asked on Nas4Free forum

A small additional question:
Is there an equivalence in FreeBSD of the following command ?
apt-get install cifs-utils

The purpose is that some users have a specific external ADSL box with an HDD. The only way to mount it is to have CIFS mount.

Thanks
 
Back
Top