No Internet, No file server

I don’t know what to do or say. I’m frustrated right now because it seems that no matter what article or forum post I follow, my file server does not work when the internet is cut off.
My home currently has no internet because the ISP is doing some maintenance, etc. No problem, but my FreeBSD file server is offline too when the internet goes. I’ve checked the rc.conf, smb4.conf, etc., everything is the way they should be. So why?
Even the NFS shares don’t work.

I’m able to ping the server from the clients and even access it via ssh. But cannot access it via smb or nfs.
The server usually houses a collection of movies and tv shows that I like to watch as well as other data. Now I’m here on my phone trying to figure out how to get it running without the Internet.

It’s even more frustrating when Windows shares are working just fine.
 
I will say that my expertise is more towards the novice so I’ll need someone clear guidance.
Some say it is a DNS issue.
My DNS for the server and the clients is set to the same address as the router/gateway.

Router / Gateway / DHCP server : 192.168.1.1
DHCP scope: 192.168.1.100 - 200
File server : 192.168.1.10
WiFi Access point : 192.168.1.2
DNS on all server and clients set to 192.168.1.1

I’ve been told I need to make sure the server’s hostname and IP are in the /etc/hosts. I’m not sure how to do that.
 
ok , so one scenario i can think of is if you have your internal DNS Names in an external network providers DNS service , then the access to the DNS function will be cut off
when the network link is lost. Its also not a good security situation if your internal Hostnames are availble on an external DNS.

Historically all network IP adresses hostname pairs was in the /etc/ hosts file on the local computer .
so the freeBSD default host file has multiple line of commentary in it which can be disgarded

the format of the /etc/hosts file is :

< ip address> tab <hostname> tab <hostname.domain name>

192.168.0.10 filervername fileservername.domainname

You can just type these Ipaddress hostname pairs into the /etc/hosts file with an editor you are used to use.
to edit the /etc/hosts file on a few computers is not difficult
It becomes very difficult to maintain with dozens or hundreds of computers. which is why DNS was invented.

//Lars
 
That, is weird. Name resolving perhaps? Using the IP address vs. the hostname?
If the DNS/Router appliance is searching the wrong domain first, the timeouts (to the absent Internet name server) can cripple a service.
I’m able to ping the server from the clients and even access it via ssh. But cannot access it via smb or nfs.
It would help to know which services work using IP addresses and if any work at all using host names.
 
You can just type these Ipaddress hostname pairs into the /etc/hosts file
If you do this, remember to ensure that the /etc/hosts is used first in name resolution, as determined by "hosts: files" in nsswitch.conf(5):
Code:
[gunsynd.389] $ grep "hosts:" /etc/nsswitch.conf
hosts: files dns
For maximum portability of the /etc/hosts file, I recommend that you put the fully qualified domain name first, followed by aliases,e.g.:
Code:
[gunsynd.390] $ grep printer /etc/hosts
192.168.1.21 hp4050n.my.domain.name hp4050n printer
As far as I know, the ordering of names does not matter on FreeBSD, but it matters a lot on (at least some) Linux variants, e.g. Debian and Ubuntu.
 
I put in the following to /etc/hosts
Code:
serverIP serverhostname serverhostname.workgroup
SMB shares worked right away after that. Didn’t change anything else.
Now, I need to figure out why the NFS shares won’t automount on my system.
 
Take your ISPs equipment out of the loop and route your traffic with your own local router. Some of the new equipment won't allow wifi, especially, traffic on a downed network. The ISPs have nasty tricks and a lot of time routing traffic to an error page hosted on the router prevents traffic on the local network.

EDIT: I recently experienced this in the US with my provider. My local network was fine but the ISPs router was rerouting http calls to a server hosted on the router with an error page.
 
It would help to know which services work using IP addresses and if any work at all using host names.
Show us /etc/exports from the NFS server.

What do you mean bu "automount"? Are you using automountd(8)? Or do you just have the NFS mounts in /etc/fstab on the NFS clients? We need to see the clients' configurations.
 
Show us /etc/exports from the NFS server.

What do you mean bu "automount"? Are you using automountd(8)? Or do you just have the NFS mounts in /etc/fstab on the NFS clients? We need to see the clients' configurations.
I have the NFS mount in the /etc/fstab. The internet came back yesterday and the moment it came back, my workstation was back to up and running with the NFS shares being accessible. I'm not sure how that works because a few months ago, when I was having the same issue with the file server, the SMB would not work without the internet, but the NFS always worked regardless.
I didn't change anything in the settings. So what happened. Why did the NFS suddenly change as well.
 
If you have the same local netmask in the NFS server and the NFS client the traffic should not choose to travel via the ISP router.

with for ex:

NFS server 192.168.0.10
NFS client 192.168.0.20

and Netmask 255.255.255.0 in both machines

and using IP adress , not hostname in /etc/fstab to describe the NFS shares
or having the IP hostnames pairs in the /etc/hosts file in both machines
then you would have a local setup that is not dependent on your ISP DNS.


If the client or the server at any point have a not-resolved hostname for which the IP address is not declared, it will ask DNS.
IF DNS is not available at that point you are in trouble.

If the server has not had the client listed in the servers /etc/host with ipadress hostame pair, and the DNS dies server may not find the client.

One solution for this is to build/install a local DNS in you network that contains you local network information and interun asks the ISP DNS for external stuff.

I grew up on the O'Reilly Book DNS & BIND 30 years ago , so all these things are documented , you only need to read it.
 
I think that the real problem is not even in the FreeBSD server (which seems to be on the 192.168.x.x internal net).

The IPs mentioned - they are NOT Internet-legal.

I think OP's router is set up weird.

Case in point - I own an Asus AC 1900 set up with DD-WRT. I actually left most of the routing sections in there on default settings, just changed the security settings a bit. I'd actually love to study more about that stuff once I have the time and inclination.

That router sits behind a dumb DOCSIS 3.1 modem (A separate device that I also own, but had to cooperate with my ISP to make sure I have the connection I paid for)

If I turn that modem off, or if I lose my Internet connection (Both did happen to me a few times) my internal network is fine.

Really sounds like OP is renting a single device with two functions (router AND modem) built in.

With such devices, the ISP is the one in control of both Internet connection and internal (192.168.x.x) routing.

Small wonder then, as to why the internal net goes down when the Internet connection is lost. FreeBSD setup is not the issue here at all. If OP had a Linux or Windows host behind that kind of router, OP would see the exact same problems.

I think it's not impossible to set up a FreeBSD host to cooperate with that rental 2-in-1 device, but that takes some brains and a willingness to study the manuals for a few hours.

My solution was to spend $100 on a router that I can install DD-WRT on, and then $150 on a separate dumb modem device that is nonetheless up-to-date and supported by my ISP. That's what it takes to separate points of failure and make things simple. With the setup I have, all the NFS and routing ideas that I pick up on the Internet - they work, even if I don't have an Internet connection. :P

Edit: Re-reading the Opening Post, it sounds like the Windows shares are fine. That still points to OP's router most likely having weird DNS or firewall rules. And it may be difficult to change those if OP's router is a 2-in-1 device rented from the ISP. ISP very well can make that stuff read-only, or even prohibit the customer (via Terms of Service) from editing the DNS and firewall settings on that router/modem device.
 
Back
Top