dd-WRT on FreeNAS

Status
Not open for further replies.
Joined
Jun 24, 2017
Messages
338
Hey guys... I was wondering if anyone has tried using FreeNAS as their DHCP server (or more importantly, as a router in general)...
If not, does anyone know the order in which FreeNAS comes up (i.e., does it require that it locks its IP address before initializing any Virtual Machines... or does it boot completely including bringing up Virtual Machines before binding to an IP address...)
I haven't tried this in any degree yet... but am happy to experiment if it hasn't been done or attempted before... I did a rudimentary search, but all I could find was people not having a good grasp on how to do port forwarding to access their NAS from outside their network, especially when using software like dd-WRT...

Any help is appreciated.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
You should configure your FreeNAS system with a static IP address instead of ever expecting it to pickup an address from DHCP. That is just basic server management for any server. You always want to assign the addresses of servers in such a way that there is no question about what the address might be or any possibility of it changing.

Also, certain services need the IP address to be able to start, so that needs to happen before some other things can happen.

If you just want to serve DHCP addresses from a VM running on FreeNAS, that should be easy. What are you actually trying to accomplish?
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I would say that since you ask the question it's a bad idea to try. Safety will be risky unless you know what your doing. The mentioning of ddwrt instead of something like pfsense or similar also wants me to recommend agents this idea. If you want a firewall in the same box as the NAS just velcro a SG-1000 to the inside of your chassis?
 
Last edited by a moderator:
Joined
Jun 24, 2017
Messages
338
While I appreciate responses... maybe I should have been a little more specific in what kind of responses I was looking for...
1) I am aware that a static IP for a server is a best practice...
2) The question I posed wasn't about should I have a static IP or allow my machine to pick up an IP assigned by a DHCP server...
3) "Also, certain services need the IP address to be able to start, so that needs to happen before some other things can happen." doesn't actually answer the question about in what order things are brought up in FreeNAS... IP before VM or VM before IP?
4) The initial question was somewhat pretty straightforward... Has anyone run dd-wrt from a FreeNAS VM, or any DHCP machine from a FreeNAS...
5) I am gathering information in regards to actually running dd-wrt from a FreeNAS VM... while I realize I didn't flat out say that in the initial question, it all sort of leads one to be able to cobble that together...
6) Why is it bad to ask questions before trying?
7) Why recommend against dd-wrt versus using something like PfSense? PfSense tends to be a bit overkill... hell, for what I am looking for, dd-WRT is slight overkill, I could, in theory, run the DHCP server from an Ubuntu VM that already runs on my FreeNAS... that being said, I didn't ask about PFSense...
8) garm, please let anyone you ever work for know that your best solution to a problem is to velcro another machine inside of something else to skip any of the possible hard work in making a system work the way you or they want it to... I'm sure they'll be thrilled

That all being said... I guess I could have been a little clearer in asking:
has anyone run a VM of dd-wrt to function as their router inside of a FreeNAS VM?
if not... does anyone with any actual knowledge of how FreeNAS comes up tell me if FreeNAS requires an IP or the webGUI to come up (thus, needing an IP first) before the VMs are launched?

I ask the second the way I do because Ive noted in the past, if the network is down and FreeNAS can't see itself based on the IP address it wants, or falls back on a DHCP assigned IP, it doesn't seem to want to go any further in the boot process based off of the text output...
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
You are acting like you are smart and we are so dumb.
You will find out

Sent from my SAMSUNG-SGH-I537 using Tapatalk
 
Joined
Jun 24, 2017
Messages
338
You are acting like you are smart and we are so dumb.
You will find out

Sent from my SAMSUNG-SGH-I537 using Tapatalk
No, you are acting like I'm some kind of moronic asshole incapable of asking the question I need answered...

I asked, because as far as my skillset goes, I'm a retarded monkey trying to fuck a football and I'm not even sure which end is the good one on this...
I asked, because I am in need of answers if any exist before I go plowing into the unknown like the idiotic cowboy that ends up dead at the end of the movie...
I asked, because you guys here are WAY the fuck smarter than I am in regards to this system, how it works, and what it is I should know before I attempt to do what I am trying to do...

More importantly than that though, is it's infinitely more likely that someone else has already tried this and succeeded... or failed. And if they did either, I would like to know...


*edit* I like the censoring here... the first line wasn't "friend" ... the rest are obvious.
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
4) The initial question was somewhat pretty straightforward... Has anyone run dd-wrt from a FreeNAS VM, or any DHCP machine from a FreeNAS...

Yes, I tried running pfsense in a VM. Pain in the ass as the VM capability was unstable (for me) back when I made the attempt. So I run both FreeNAS and pfSense as VMs on esxi instead. Much better stable solution for my needs. I can't comment on running a VM on FreeNAS 11 as I haven't done it. No need.
 
Last edited by a moderator:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I didn't realise that dd-wrt was avaiable as an x86 option... https://www.dd-wrt.com/wiki/index.php/X86

anyway, some people have succeeded in running pfSense in bhyve under FreeNAS.

http://davidnelson.me/?p=439

Its the same general principle.

I'm testing using FreeNAS and pfSense side by side under ESXi. Its easier that way, as the pfSense VM can be launched first. And ESXi is a much more reliable hypervisor currently than bhyve.

Again, same general principle.
 
Joined
Jun 24, 2017
Messages
338
I didn't realise that dd-wrt was avaiable as an x86 option... https://www.dd-wrt.com/wiki/index.php/X86

anyway, some people have succeeded in running pfSense in bhyve under FreeNAS.

http://davidnelson.me/?p=439

Its the same general principle.

I'm testing using FreeNAS and pfSense side by side under ESXi. Its easier that way, as the pfSense VM can be launched first. And ESXi is a much more reliable hypervisor currently than bhyve.

Again, same general principle.
Yeah, I've decided to pull the trigger and start trying to get it to work... and then go from there... no harm in trying...

BUT, I'm having a hell of a time trying to figure out where to image it to... (My zvol structure is as follows: create zvol named ddWRT... it is then housed in /dev/zvol/Storage/ddWRT ... I run (from shell): dd if=/mnt/Storage/ddwrt.image of=/dev/zvol/Storage/ddWRT but that doesn't seem to do what I want (doesn't boot)... tried of= to .../ddWRT/disk0 with the same effect... fought with that and UFI for a bit then gave up... in retrospect, I'm not 100% sure ddWRT boots via EFI or UEFI... so, that might pose a problem.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
8) garm, please let anyone you ever work for know that your best solution to a problem is to velcro another machine inside of something else to skip any of the possible hard work in making a system work the way you or they want it to... I'm sure they'll be thrilled

thanks for the advice :)
If your interest is only in the dhcp server, I agree that pfsense is overkill. I would simply run dnsmasq from a jail and set up static addresses for FreeNAS and all it's services. But if you are looking for a "firewall" for your NAS, I would stick to the welcro alternative.
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
I run dnsmasq in a jail to do DNS and DHCP . Works like a charm. Firewall is a dedicated appliance
 
Joined
Jun 24, 2017
Messages
338
I run dnsmasq in a jail to do DNS and DHCP . Works like a charm. Firewall is a dedicated appliance

Is your FreeNAS routed through the jail? Assuming you have it (FreeNAS) self assign an IP... does it's IP remain inside of the pool assigned by the DHCP? and did you have to do anything tricky to get it to work right, or did it sort of just work "out of the box"? Any chance you have OpenVPN running in that jail? (just wondering)
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
Is your FreeNAS routed through the jail?
no
Assuming you have it (FreeNAS) self assign an IP... does it's IP remain inside of the pool assigned by the DHCP?
my FreeNAS has a manual set static IP, like every other service/jail/appliance I run on my network, that lies outside my DHCP pool
my dhcp pool ist from x.x.x.10 to x.x.x.99 with 12h leasetime
dhcp-range=192.168.1.10,192.168.1.99,12h
but you can define extra ranges for static assigned MAC:IP

If I want some services reachable on the LAN via some name I give it a DNS override (this works great if your router can't do hairpin routing)
address=/cloud.example.com/192.168.1.111
or to block some dodgy services for you whole network
address=/double-click.net/127.0.0.1

and did you have to do anything tricky to get it to work right, or did it sort of just work "out of the box"?
dnsmasq is very easy, just read through the dnsmasq.conf and uncomment whatever you need.
I just have one more entry that sets the standard gateway
dhcp-option=3,192.168.1.1
the DNS server adress it relays its requests to is read out from my /etc/resolv.conf
Any chance you have OpenVPN running in that jail? (just wondering)
no, I have for every service its own jail running. I plan on trying out OpenVPN when I upgrade to 11.1
 
Status
Not open for further replies.
Top