OPNsense Forum

English Forums => General Discussion => Topic started by: PCServices on January 23, 2018, 12:55:59 am

Title: Using same hardware as file server
Post by: PCServices on January 23, 2018, 12:55:59 am
Hi All,

I am new to OPNsense and was thinking that it would be nice to use the same machine, and more of it's 1Tb HDD, that I installed OPNsense onto as a file server, possibly with additional HDDs added either internally or via USB.

I have searched but can't find anything about doing this or even if it's possible?

aTdHvAaNnKcSe
Title: Re: Using same hardware as file server
Post by: elektroinside on January 23, 2018, 08:36:27 am
Although it may sound appealing, unless everything involved is somehow isolated from the rest of OPNsense (which i'm not sure if it's possible), don't know if it's such a good idea...
Title: Re: Using same hardware as file server
Post by: Ciprian on January 23, 2018, 12:21:30 pm
I was reading about some guys that installed a virtualization platform (ESXi, and last version of FreeNAS with integrated Docker support) and had 2+ VM (OPNsense being one of them) configured in a SDN/ Virtual Switch approach, but you really must know what you're doing, since the solution saves HW but seriously adds up administration overhead.
Title: Re: Using same hardware as file server
Post by: elektroinside on January 23, 2018, 01:37:52 pm
Too many points of failure in one box. I like dedicated devices way more (at least for critical stuff).
Title: Re: Using same hardware as file server
Post by: PCServices on January 23, 2018, 03:15:12 pm
Thanks for the responses. I was thinking of using FreeBSD's Jails feature to create a separate instance of FreeBSD. As for the files, I would only be reconning to use it as a backup server for my photographs (I'm a semi-pro photographer) so it would only be saving copies of client photographs with no highly sensitive information.

I get the point about using separate machines but that means buying another computer or dedicated NAS, and the associated running costs, both in terms of power consumption and space to have it. As this computer is always on, has a multi-core CPU & plenty of RAM I would rather dual purpose the one set of hardware.
Title: Re: Using same hardware as file server
Post by: elektroinside on January 23, 2018, 03:45:57 pm
This might work (as an idea) for your specific needs. Indeed, having a dedicated machine might be a little expensive, especially when it comes to storage. But, if you ever consider buying one, I personally recommend Synology devices.
Back to the issue: unfortunately, I'm not an expert in FreeBSD and I cannot help you with this. Maybe somebody here can. Anyways, good luck and welcome to OPNsense!
Title: Re: Using same hardware as file server
Post by: Ciprian on January 25, 2018, 09:41:35 am
I get the point about using separate machines but that means buying another computer or dedicated NAS, and the associated running costs, both in terms of power consumption and space to have it. As this computer is always on, has a multi-core CPU & plenty of RAM I would rather dual purpose the one set of hardware.

If you want to run both OPNsense and NAS software on your single machine, don't go "ready-made", go custom. First, search the web for expressions like "freenas and pfsense" etc. and you will get a good and close enough picture of how it has to be done.

I only strongly emphasize the idea that you would need much more powerful HW (CPU, especially), than one found in ready-made solutions of NAS providers (Drobo, Synology, Asustor etc etc etc etc). These NAS providers are building their ready-made HW around storage tasks only (most of them, at least, and those which specifies that can do other "tricks" are way more expensive), which doesn't require too much FLOPS to get an excellent storage/ file server job done. But since you want to run on top and beside of NAS, at least a FW like OPNsense, and maybe you want to use most, if not all of its functions (I'm thinking traffic shaping, IDPS first and foremost), you will definitely need much more processing power than for storage only.

And, since you are a photographer, maybe multimedia sharing for customers (photos and especially videos) for preview purposes wouldn't be something out of usual. That case, think about that if only streaming is involved, a decent priced "ready-made" NAS will do the trick; but maybe some customers will attempt to play those videos on devices that require different format and/ or resolution, and then you will definitely need the most processing power available, since trans-coding is a very demanding task.

Also, since you have a NAS, maybe you would prefer your NAS to do some multimedia tricks (like HTPC stuff/ trans-coding) for yourself too (even if not for your customers).

I would dare to recommend you a HW machine based on Ryzen CPU (at least 1700 model), since it offers at a quite fair price enough powerful cores/ CPU + SMT (Hyper-Threading: two simultaneous threads per core) in order to dedicate enough CPU resources for multiple Virtual Machines you might have. Intel is a very good option also, but for virtualization/ parallel resource allocation would require server grade CPUs like Xeon (very pricey), since (yet) no desktop/ consumer CPUs (i7 included) offer more than 4 cores/ 8 threads (no go for virtualization), and those who does (i9) are "bank breakers". :)

Anyway, do your homework, do your research, chose wisely, and let us know what did you chose, why, for what purposes, and how well it works for you.

Cheers!
Title: Re: Using same hardware as file server
Post by: PCServices on January 25, 2018, 03:29:53 pm
Hi hutiucip,

Thank you for taking the time to write such a long reply. However, you seem to be assuming that I want to use the storage space for more than just static backup of files. My customer files are hosted on my sales site where customers can purchase the photographs they want or share small versions of the files on social media. I do not deal with video either.

The machine that I have OPNsense running on has an i5 CPU and 6Gb of RAM and 1Tb HDD. Yes, I use it for IPS, AV proxy and DHCP but most of the time the CPU is running at less than 5% and peaking at around 25%. It's not on a busy commercial LAN, it's my home LAN and, as I am the main network user, during the times I would be dumping files for backup onto the NAS I would not be expecting to run streaming HD video downloads from the web or other tasks like that.
Title: Re: Using same hardware as file server
Post by: fabian on January 25, 2018, 05:50:56 pm
Just a side note: OPNsense has an SSH server which supports SCP and SFTP (both are protocols for file access).
You can create a user that can use SSH to store files on the drive.
Title: Re: Using same hardware as file server
Post by: PCServices on January 25, 2018, 06:18:48 pm
Ah, that's about all I need. Thanks Fabian :-)
Title: Re: Using same hardware as file server
Post by: Ciprian on January 26, 2018, 08:46:33 am
Just a side note: OPNsense has an SSH server which supports SCP and SFTP (both are protocols for file access).
You can create a user that can use SSH to store files on the drive.

It's not just a side note at all, thank you for your pointing in this useful direction. :)