New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Trouble configuring B3 on local network (LONG)

Got problems with your B2 or B3? Share and get helped!
Post Reply
txporter
Posts: 15
Joined: 12 Oct 2007, 09:04

Trouble configuring B3 on local network (LONG)

Post by txporter »

My old B1 is set up behind a hardware firewall box which is between my local network and the WAN. The only thing the firewall box does is filter packets and forward some ports to selected internal IP addresses. It has a fixed internal IP address of 192.168.1.1 and serves as my gateway.

The only other non PC/lapop devices on the network are the B1 and an Airport Extreme that also has a fixed IP address assigned of 192.168.1.20.

My B1 takes care of everything else, it has fixed IP of 192.168.1.30:
- DNS server doing local cacheing for my internal network.
- DHCP server handing out leases to PC's on the network. Most PC's are set up in the dhcpd.conf with entries that match MAC addresses to specific host names, and I believe the DNS server then assigns internal IP addresses based on the names assigned by DHCPD. I do have a range of dynamic IP addresses avail for guests a swell.

I purchased a B3 chassis and installed a 500 GB SSD, and would like to run it in the same setup as my old B1, but have not been able to set it up properly using Network/Profile panels after initial install of B3 system via USB stick.

Can I even set it up this way, since it appears the router+firewall+server config seems to want a connection to the WAN port?

At this point, I would rather not waste people's time describing all the various configs I have tried, but they are combinations of:

- Crossover connection vs plugging B3 into existing network
- Assign B3 same IP as B1 (192.168.1.30) and taking B1 off line. (then B3 plugged into network)
- Assign B3 diff fixed IP and and plug into network.
- Run as server only with NO extra settings turned on (Specifically DNS and DHCP server were off) but plugged into network.
- Run in Firewall+Router+server with only lan port plugged into network. NO WAN connection.

In all cases where I try to set a fixed IP for the B3 (which requires choosing a profile other than automatic) I cannot then connect to it, even when assigning a different IP address to it and leaving the B1 active.

Hmm, I have NOT entered any entries for it's fixed IP address into my B1's local ZONE and REV bind files when trying to have it co-habit on the internal network with my B1

At any rate, I am pulling hair out and getting myself very confused.

Any hints or directions to go very welcome.

Tom P.
txporter
Posts: 15
Joined: 12 Oct 2007, 09:04

Re: Trouble configuring B3 on local network (LONG)

Post by txporter »

UPDATE:

I set up DHCPD and DNS on old B1 to serve 192.168.1.31 to the new B3, then after restarting B3, I saw that all the grayed out settings shwn in the LAN settings are looked good.

Switched profile to Server only with NO DHCP or DNS turned on and then switched LAN settings to fixed Ip address. Reboot,

Took DHCPD settings for B3 MAC address out of B1 DHCPD.conf file, restarted B1 DHCP3 service, and B3 now joines network as B3 at 192.168.1.31.

Now all I have to do is figure out how to get DNS and DHCP configured as on the B1. Could still use any hints on this if actual config file requirements have changed in 8 years, due to new versions of DHCPD server, more security settings for DNS, etc.
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: Trouble configuring B3 on local network (LONG)

Post by Gordon »

Ah yes. The difference between router-firewall-server and server-only was somewhat hazy for me as well. Turns out this is related to which adapter you can assign the default gateway.

DHCP in the B3 is not offered by dhcpd, but by dnsmasq. Of course you can use dhcpd, but then you cannot manage the settings and view leases through the web admin. On the other hand your setup isn't exactly standard and will most likely require some additional settings to be added through console anyway. You should use whatever you feel more comfortable with.
txporter
Posts: 15
Joined: 12 Oct 2007, 09:04

Re: Trouble configuring B3 on local network (LONG)

Post by txporter »

Gordon,

Thanks for the heads up about dnsmasq. Oh well. another service to learn about. I really don't want to change more than necessary, and replacing dnsmasq with a dhcpd server seems like more variable than I want to mess with. I'll crackthe books, but if anyone has hints on serving static addresses with dnsmasq and how it interacts with a DNS server that would be great.

If I turn on the DNS server, does it automatically start up a cacheing name server, but not have any local zone or rev files?

Thanks,

Tom P.
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: Trouble configuring B3 on local network (LONG)

Post by Gordon »

Hi,

dnsmasq is a caching name server. It will read your servers hosts file and resolv.conf for static addresses and DNS server(s) to reference. Alternatively you can tell it to to read the DNS servers to use from a different file - handy of you want the B3 to use the local DNS caching service as well (i.e. have 127.0.0.1 in /etc/resolv.conf).

The web admin controls the content of /etc/dnsmasq.d/bubba.conf. If you like to add other content I suggest you put this in different files. e.g. you can add additional dhcp ranges to serve other (v)lan's, or add static leases, add an MX entry to serve a locally hosted email domain, and add extra options such as default and/or static routes (by default dnsmasq's dhcp server will offer itself as default router, which is not what you want)

Options I use myself

Code: Select all

#Static lease
dhcp-host=<client mac>,<IP to hand out>,<machine name>
#Mail server
mx-host=<mydomain>,<my local email server>,<rank>
#Alternate resolv.conf file
resolv-file=<file to read DNS servers from - default  /etc/resolv.conf>
#Default gateway
dhcp-option=3,<default gateway>
# Static routes for Windows clients
dhcp-option=249,<static route 1>,<gateway 1>,<static route 2>,<gateway 2>,... 
# Static routes for linux clients
dhcp-option=121,<static route 1>,<gateway 1>,... 
txporter
Posts: 15
Joined: 12 Oct 2007, 09:04

Re: Trouble configuring B3 on local network (LONG)

Post by txporter »

Gordon,

Thanks for the pointers.

Basic Question: I still have my B1 running, but am tryign to get the B3 set up so I can unplug the B1 from the network, and see if the B3 will pick up the DNS and DHCP services instead. With that assumption, In the web interface under Server Only profile> LAN Settings, I now have:

- Use static IP address settings is on with the B3 static IP address and the gateway pointing to my firewall router.
- Primary DNS set to an OpenDNS server, 208.67.222.222
- Enable DNS Service is on.
- Enable DHCP Server is off.

Would I be correct in assuming that it is dnsmasq that will handle both DNS and DHCP services as opposed to needing Bind and another dhcpd server running? If this is so, what actually happens when I switch the Enable DHCP Server from off to on? What files are modified? My etc/dmsmasq.d directory has bubba.conf in it, as you mentioned, but I was wondering if it would change when I turned on dhcp server?

dhcp-leasefile=/var/lib/dnsmasq/dnsmasq.leases
interface=eth1
localise-queries
bogus-priv
domain-needed
dhcp-authoritative
domain=localdomain
dhcp-range=192.168.1.50,192.168.1.100,12h
no-dhcp-interface=eth1
Post Reply