Re: [weewx-user] Re: AcuRite bridge and DNS setup

2018-03-13 Thread RobbH
Just to close this thread, I decided to let the bridge have port 80 and 
configured apache to listen on port 8000. It's not an elegant solution, but 
everything works. I may revisit it later, after learning more.

I wouldn't have gotten this far without the generous help of the community. 
Thanks to all, and my apologies for sometimes being too ignorant to make 
sense of your advice. Especially to Matthew, I'd like to say that I really 
appreciate your attempts to help me out, and on the occasions when I wasn't 
able to comprehend what you were saying, I hope you didn't feel you had I 
had wasted too much of your time. I'll consult this thread in the future, 
when I hope to be better prepared to understand it.


On Saturday, March 10, 2018 at 3:27:41 PM UTC-5, RobbH wrote:
>
> Thanks for all the help and patience with my bumbling. I can now report 
> success, as far as the topic of this thread is concerned. I'm currently 
> using Vince's suggestion, Pi-hole for DNS. Once I got a functional bridge, 
> it worked immediately.
>
> Of course, I've still got some issues to deal with before the new station 
> can go online. DNS is not the issue, so I can start a separate thread if 
> that would be better. I just need to get the Interceptor driver to co-exist 
> with the apache2 server. My situation matches the "most complicated " 
> scenario described in the Interceptor readme file:
>
> Example 5: weewx is running on host 'pi', which has a web server on port 80
>> to display weewx reports. Configure the driver to listen on port . 
>> Add a
>> reverse proxy to the web server configuration to direct traffic on port 
>> 80 from
>> the device to port . Add a DNS entry so that traffic from the device 
>> is
>> sent to 'pi' instead of the cloud.
>
>
> Later in the readme there's an example of a reverse proxy:
>
>>
>> 2a) Here is an example of an Apache 'reverse proxy' configuration for the
>> Acurite internet bridge. The Apache server sends any requests from the
>> internet bridge to the driver. In the file 
>> /etc/apache2/conf.d/myacurite.conf: 
>
>  
>
>> RewriteEngine on
>> RewriteCond %{HTTP_POST} www.myacurite.com
>> RewriteRule ^/weatherstation(.*)$ http://Y.Y.Y.Y/weatherstation$1 
>> 
>
>
> I've tried that, but it doesn't seem to do what I need. The driver still 
> reads data as long as it's listening to port 80, but finds nothing when 
> listening on .
>
> Any advice will be appreciated!
>
>
> On Thursday, March 8, 2018 at 11:16:14 AM UTC-5, RobbH wrote:
>>
>> "Supported" makes sense. Thanks for making that distinction, as well as 
>> explaining the change.
>>
>> On Thursday, March 8, 2018 at 11:04:32 AM UTC-5, vince wrote:
>>>
>>> On Thursday, March 8, 2018 at 6:39:27 AM UTC-8, RobbH wrote:

 Is dpkg still recommended? I came to my conclusion after reading the 
 docs.

 The latest revision of the installation guide for Debian-based 
 distributions doesn't even mention dpkg.
 http://www.weewx.com/docs/debian.htm



>>> Perhaps 'supported' would be a better term.
>>>
>>> The docs were updated to reflect the apt-get method of 
>>> downloading+installing the package in an easier way.   You can always 
>>> download it yourself and install it via dpkg or apt as well, and 
>>> alternately download the tarball and use the original setup.py method.  All 
>>> work fine.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: AcuRite bridge and DNS setup

2018-03-10 Thread RobbH
Thanks for all the help and patience with my bumbling. I can now report 
success, as far as the topic of this thread is concerned. I'm currently 
using Vince's suggestion, Pi-hole for DNS. Once I got a functional bridge, 
it worked immediately.

Of course, I've still got some issues to deal with before the new station 
can go online. DNS is not the issue, so I can start a separate thread if 
that would be better. I just need to get the Interceptor driver to co-exist 
with the apache2 server. My situation matches the "most complicated " 
scenario described in the Interceptor readme file:

Example 5: weewx is running on host 'pi', which has a web server on port 80
> to display weewx reports. Configure the driver to listen on port . Add 
> a
> reverse proxy to the web server configuration to direct traffic on port 80 
> from
> the device to port . Add a DNS entry so that traffic from the device is
> sent to 'pi' instead of the cloud.


Later in the readme there's an example of a reverse proxy:

>
> 2a) Here is an example of an Apache 'reverse proxy' configuration for the
> Acurite internet bridge. The Apache server sends any requests from the
> internet bridge to the driver. In the file 
> /etc/apache2/conf.d/myacurite.conf: 

 

> RewriteEngine on
> RewriteCond %{HTTP_POST} www.myacurite.com
> RewriteRule ^/weatherstation(.*)$ http://Y.Y.Y.Y/weatherstation$1 
> 


I've tried that, but it doesn't seem to do what I need. The driver still 
reads data as long as it's listening to port 80, but finds nothing when 
listening on .

Any advice will be appreciated!


On Thursday, March 8, 2018 at 11:16:14 AM UTC-5, RobbH wrote:
>
> "Supported" makes sense. Thanks for making that distinction, as well as 
> explaining the change.
>
> On Thursday, March 8, 2018 at 11:04:32 AM UTC-5, vince wrote:
>>
>> On Thursday, March 8, 2018 at 6:39:27 AM UTC-8, RobbH wrote:
>>>
>>> Is dpkg still recommended? I came to my conclusion after reading the 
>>> docs.
>>>
>>> The latest revision of the installation guide for Debian-based 
>>> distributions doesn't even mention dpkg.
>>> http://www.weewx.com/docs/debian.htm
>>>
>>>
>>>
>> Perhaps 'supported' would be a better term.
>>
>> The docs were updated to reflect the apt-get method of 
>> downloading+installing the package in an easier way.   You can always 
>> download it yourself and install it via dpkg or apt as well, and 
>> alternately download the tarball and use the original setup.py method.  All 
>> work fine.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: AcuRite bridge and DNS setup

2018-03-08 Thread RobbH
"Supported" makes sense. Thanks for making that distinction, as well as 
explaining the change.

On Thursday, March 8, 2018 at 11:04:32 AM UTC-5, vince wrote:
>
> On Thursday, March 8, 2018 at 6:39:27 AM UTC-8, RobbH wrote:
>>
>> Is dpkg still recommended? I came to my conclusion after reading the docs.
>>
>> The latest revision of the installation guide for Debian-based 
>> distributions doesn't even mention dpkg.
>> http://www.weewx.com/docs/debian.htm
>>
>>
>>
> Perhaps 'supported' would be a better term.
>
> The docs were updated to reflect the apt-get method of 
> downloading+installing the package in an easier way.   You can always 
> download it yourself and install it via dpkg or apt as well, and 
> alternately download the tarball and use the original setup.py method.  All 
> work fine.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: AcuRite bridge and DNS setup

2018-03-08 Thread vince
On Thursday, March 8, 2018 at 6:39:27 AM UTC-8, RobbH wrote:
>
> Is dpkg still recommended? I came to my conclusion after reading the docs.
>
> The latest revision of the installation guide for Debian-based 
> distributions doesn't even mention dpkg.
> http://www.weewx.com/docs/debian.htm
>
>
>
Perhaps 'supported' would be a better term.

The docs were updated to reflect the apt-get method of 
downloading+installing the package in an easier way.   You can always 
download it yourself and install it via dpkg or apt as well, and 
alternately download the tarball and use the original setup.py method.  All 
work fine.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: AcuRite bridge and DNS setup

2018-03-08 Thread RobbH
Is dpkg still recommended? I came to my conclusion after reading the docs.

The latest revision of the installation guide for Debian-based 
distributions doesn't even mention dpkg.

http://www.weewx.com/docs/debian.htm

It is still one of the recommended ways to upgrade an existing 
installation, though.


On Thursday, March 8, 2018 at 4:00:13 AM UTC-5, Liz wrote:
>
> On Wed, 7 Mar 2018 19:58:44 -0800 (PST) 
> RobbH  wrote: 
>
> > This is on Debian, with Weewx installed using dpkg. (I see now that 
> > that's no longer a recommended way to install.) 
>
> Of course it's a recommended way to install - I'm not sure how you came 
> to that conclusion. 
>
> Liz 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: AcuRite bridge and DNS setup

2018-03-08 Thread Liz
On Wed, 7 Mar 2018 19:58:44 -0800 (PST)
RobbH  wrote:

> This is on Debian, with Weewx installed using dpkg. (I see now that
> that's no longer a recommended way to install.) 

Of course it's a recommended way to install - I'm not sure how you came
to that conclusion.

Liz

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-03-07 Thread RobbH
Thanks to all! This is the command that finally worked to show the 
Interceptor help message:

PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py 
--help

This is on Debian, with Weewx installed using dpkg. (I see now that that's 
no longer a recommended way to install.) 

So now I think I'm finally ready to try to capture some packets from the 
Bridge as soon as I have a working bridge. Can I safely assume that 
there are no known unbricking strategies, and I should start looking for 
another?


On Wednesday, March 7, 2018 at 10:09:41 PM UTC-5, mwall wrote:
>
>
>
> On Wednesday, March 7, 2018 at 9:20:31 PM UTC-5, RobbH wrote:
>>
>>
>> Meanwhile, I've encountered another issue, that I think is independent of 
>> the hardware issues. Installation of the Interceptor appeared to be 
>> successful, but I am unable to run the driver directly, following the 
>> directions in the readme file. This command:
>>
>> PYTHONPATH=bin python bin/user/interceptor.py --help
>>
>> produces this error:
>>
>> python: can't open file 'bin/user/interceptor.py': [Errno 2] No such file 
>> or
>> directory
>>
>>>
>>>
> when using relative paths, the directory in which you invoke the command 
> matters:
>
> cd /home/weewx
> PYTHONPATH=bin python bin/user/interceptor.py --help 
>
> or you can use absolute paths to do it from anywhere:
>
> PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/interceptor.py 
> --help
>
> m
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-03-07 Thread mwall


On Wednesday, March 7, 2018 at 9:20:31 PM UTC-5, RobbH wrote:
>
>
> Meanwhile, I've encountered another issue, that I think is independent of 
> the hardware issues. Installation of the Interceptor appeared to be 
> successful, but I am unable to run the driver directly, following the 
> directions in the readme file. This command:
>
> PYTHONPATH=bin python bin/user/interceptor.py --help
>
> produces this error:
>
> python: can't open file 'bin/user/interceptor.py': [Errno 2] No such file 
> or
> directory
>
>>
>>
when using relative paths, the directory in which you invoke the command 
matters:

cd /home/weewx
PYTHONPATH=bin python bin/user/interceptor.py --help 

or you can use absolute paths to do it from anywhere:

PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/interceptor.py --help

m

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-03-07 Thread gjr80
Suspect you probably will need to set PYTHONPATH otherwise any 'weeWX' related 
imports in interceptor.py (haven't looked but am sure there will be some) will 
fail.

Gary

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-03-07 Thread vince
On Wednesday, March 7, 2018 at 6:20:31 PM UTC-8, RobbH wrote:
>
> Meanwhile, I've encountered another issue, that I think is independent of 
> the hardware issues. Installation of the Interceptor appeared to be 
> successful, but I am unable to run the driver directly, following the 
> directions in the readme file. This command:
>
> PYTHONPATH=bin python bin/user/interceptor.py --help
>
> produces this error:
>
> python: can't open file 'bin/user/interceptor.py': [Errno 2] No such file 
> or
> directory
>

That command is clearly wrong to my eyes the first 'bin' is not a 
/full/path/name/to/bin fully qualified pathname, and the 
'bin/user/interceptor.py' similarly needs to be a fully qualified pathname 
ala /path/to/weewx/bin/user/interceptor.py or the like (notionally, these 
are obviously bogus examples).

Try two things:

   - python --version should return the version of the default python on 
   your system.  My pi3 returns 2.7.9 for the value.  If yours does too, you 
   'probably' do not need to set PYTHONPATH at all
   - if you ran weewx with the setup.py installer, bin/user above should be 
   the fully qualified /home/weewx/bin/user

So try "python /home/weewx/bin/user/interceptor.py --help" and see if it 
works.

Short answer: always use fully qualified pathnames whenever possible.  Less 
confusion.


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-03-07 Thread RobbH
No luck so far! I have attempted to follow and adapt Matthew Wall's 
detailed directions, without success. I've also tried Vince's suggestion of 
using a Pi as a separate DNS server. And I tried George Nincehelser's IPWX 
as well (on a Debian laptop instead of a Pi). Along the way, I began to 
suspect that my bridge wasn't working as it should. All I knew for sure was 
that I never got any human-readable data from it, and that the sensor 
status light would illuminate whenever the bridge was powered, the network 
status light would cycle on, then off again about once every minute. Syslog 
on the laptop confirmed that the bridge was connecting and disconnecting 
repeatedly.

As of today, neither status light is illuminating, and I suspect it's now a 
bricked bridge. Is there anything I can attempt to revive it, or should I 
start looking for another?

Meanwhile, I've encountered another issue, that I think is independent of 
the hardware issues. Installation of the Interceptor appeared to be 
successful, but I am unable to run the driver directly, following the 
directions in the readme file. This command:

PYTHONPATH=bin python bin/user/interceptor.py --help

produces this error:

python: can't open file 'bin/user/interceptor.py': [Errno 2] No such file or
directory

Python 2.7 and 3.4 are both installed on the laptop. "python" is linked to 
2.7 in /usr/bin/.

Thanks for any guidance anyone is willing to provide!



On Wednesday, February 28, 2018 at 12:06:42 PM UTC-5, RobbH wrote:
>
> This is more a Linux question than a Weewx question, but it is necessary 
> to get Weewx working the way I want it to. This is a networking issue 
> unlike any I've dealt with, so I hope someone with greater knowledge will 
> be willing to share it.
>
> My main router, a Netgear R7000, does not provide the sort of DNS 
> flexibility I need to route the bridge's calls to hubapi.myacurite.com to 
> the computer running Weewx. I could install dd-wrt firmware and get that 
> capability, but that would reduce the router's wireless range, so I'm 
> reluctant to do that.
>
> My plan was to add a second ethernet port to the Weewx computer, and 
> "share the internet connection" through that port. I assumed that I could 
> then add this line to the hosts file on that computer:
>
> 127.0.0.1 hubapi.myacurite.com
>
> and that would solve the problem. But it doesn't seem to work as expected. 
> I can plug a laptop into the shared port and browse the web, But requests 
> from the laptop are not filtered through the hosts file. I've also tried 
> setting up dnsmasq, but with the same result. Both the hosts file and 
> dnsmasq work as they should for requests from a browser on the same 
> computer, but not for the laptop plugged into the shared port.
>
> (Just for what it's worth, I've tested this approach on my main desktop, 
> running Mint 17.3 (X86_64). The Weewx computer is running Debian Jessie (32 
> bit). I realize that a working solution on the Mint desktop may not 
> transfer perfectly to the Debian box, but it should at least get me in the 
> ballpark before I start messing with the Weewx machine.)
>
> At this point, I'm completely stymied. I suspect there's something very 
> basic that I'm overlooking. I've been using Linux more than ten years now, 
> but I've learned it piecemeal, just picking up bits of information as 
> needed. That sometimes catches up with me, and my guess is that this is one 
> of those times. If anyone can help me get started on the right path, I'll 
> be grateful.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-02-28 Thread RobbH
Good point! Probably easier to implement than Matt's suggestion, but it 
adds extra hardware. I'll weigh the advantages of both and decide. (Or end 
up flipping a coin.)


On Wednesday, February 28, 2018 at 5:42:11 PM UTC-5, vince wrote:
>
> On Wednesday, February 28, 2018 at 11:45:16 AM UTC-8, RobbH wrote:
>>
>> That would work, but I'm trying to avoid sending all DNS requests (not 
>> DHCP) from the entire LAN through a separate server
>>
>
> Then send just the bridge box to the pihole for DHCP, if you can 
> statically set its DNS settings alone.  You're talking a $15 problem here 
> with a pi-zeroW. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-02-28 Thread vince
On Wednesday, February 28, 2018 at 11:45:16 AM UTC-8, RobbH wrote:
>
> That would work, but I'm trying to avoid sending all DNS requests (not 
> DHCP) from the entire LAN through a separate server
>

Then send just the bridge box to the pihole for DHCP, if you can statically 
set its DNS settings alone.  You're talking a $15 problem here with a 
pi-zeroW. 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-02-28 Thread RobbH
Thank you. Not the "lightweight" solution I was hoping for, using just the 
hosts file and maybe dnsmasq. But this is certainly do-able, especially 
with the helpful examples you've provided. If bind and dhcpd are what's 
called for, that's what I'll do.

...after I spend a bit more time studying your examples and digesting the 
info, that is!


On Wednesday, February 28, 2018 at 3:22:00 PM UTC-5, mwall wrote:
>
> robb,
>
> put two NICs on the computer that weewx runs on.  lets call them thing1 
> and thing2.
>
> thing1 should be the regular network configuration - it provides 
> connectivity for the computer.  it should be your LAN subnet, lets say 
> 192.168.25.0/24.  your router would be 192.168.25.1 and your computer 
> would be something like 192.168.25.30, with subnet mask of 255.255.255.0 
> and broadcast mask of 192.168.25.255.
>
> thing2 will be a private network that serves only the acurite device. 
>  give it its own subnet, lets say 192.168.100.0/24.  so the computer will 
> show up on that LAN as 192.168.100.1.
>
> configure dhcpd to run on the computer, but only serve the thing2 
> interface.  if you want, get the mac addr of the acurite device and make 
> dhcp give it the same address every time.
>
> configure bind to run on the computer, but to only serve the thing2 
> interface.  in your bind configuration, make hubapi.myacurite.com map to 
> 192.168.100.1.
>
> so what does look like? (i am using the traditional linux configurations, 
> because i find them easier to express/manage than the networkmanager junk - 
> nmcli and nmtui)
>
> this is NOT a recipe - do not just copy/paste!
>
> sudo apt-get install bind9 dhcpd
>
> /etc/network/interfaces should be something like this:
>
> auto lo
> iface lo inet loopback
> # thing1
> allow-hotplug eth0
> iface eth0 inet static
>   address 192.168.25.30
>   netmask 255.255.255.0
>   network 192.168.25.255
>   gateway 192.168.25.1
> # thing2
> allow-hotplug eth1
> iface eth1 inet static
>   address 192.168.100.1
>   netmask 255.255.255.0
>   network 192.168.100.255
>   gateway 192.168.100.1
>
> the bind configuration should be something like this in 
> /etc/bind/named.conf.local:
>
> zone "hubapi.myacurite.com" {
> type master;
> file "/etc/bind/myacurite.com";
> };
>
>
> in the file /etc/bind/myacurite.com:
>
> $TTL604800
> @   IN  SOA dns.hubapi.myacurite.com. root.hubapi.myacurite.com. (
> 2016032001 ; Serial
> 604800 ; Refresh
>  86400 ; Retry
>2419200 ; Expire
> 604800 ) ; Negative Cache TTL
> ;
> @   IN  NS  dns.hubapi.myacurite.com.
> @   IN  A   Y.Y.Y.Y
> *   IN  A   Y.Y.Y.Y
> *   IN  ::1
>
>
> /etc/dhcp/dhcpd.conf should be something like this:
>
> subnet 192.168.100.0 netmask 255.255.255.0 {
>   option routers 192.168.100.1;
>   option subnet-mask 255.255.255.0;
>   option domain-name-servers 192.168.100.1;
>   range 192.168.100.100 192.168.100.254;
>   default-lease-time 3600;
>   max-lease-time 7200;
>
> #  host hub {
> #hardware ethernet xx:xx:xx:xx:xx:xx;
> #fixed-address 192.168.100.10;
> #  }
> }
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-02-28 Thread mwall
robb,

put two NICs on the computer that weewx runs on.  lets call them thing1 and 
thing2.

thing1 should be the regular network configuration - it provides 
connectivity for the computer.  it should be your LAN subnet, lets say 
192.168.25.0/24.  your router would be 192.168.25.1 and your computer would 
be something like 192.168.25.30, with subnet mask of 255.255.255.0 and 
broadcast mask of 192.168.25.255.

thing2 will be a private network that serves only the acurite device.  give 
it its own subnet, lets say 192.168.100.0/24.  so the computer will show up 
on that LAN as 192.168.100.1.

configure dhcpd to run on the computer, but only serve the thing2 
interface.  if you want, get the mac addr of the acurite device and make 
dhcp give it the same address every time.

configure bind to run on the computer, but to only serve the thing2 
interface.  in your bind configuration, make hubapi.myacurite.com map to 
192.168.100.1.

so what does look like? (i am using the traditional linux configurations, 
because i find them easier to express/manage than the networkmanager junk - 
nmcli and nmtui)

this is NOT a recipe - do not just copy/paste!

sudo apt-get install bind9 dhcpd

/etc/network/interfaces should be something like this:

auto lo
iface lo inet loopback
# thing1
allow-hotplug eth0
iface eth0 inet static
  address 192.168.25.30
  netmask 255.255.255.0
  network 192.168.25.255
  gateway 192.168.25.1
# thing2
allow-hotplug eth1
iface eth1 inet static
  address 192.168.100.1
  netmask 255.255.255.0
  network 192.168.100.255
  gateway 192.168.100.1

the bind configuration should be something like this in 
/etc/bind/named.conf.local:

zone "hubapi.myacurite.com" {
type master;
file "/etc/bind/myacurite.com";
};


in the file /etc/bind/myacurite.com:

$TTL604800
@   IN  SOA dns.hubapi.myacurite.com. root.hubapi.myacurite.com. (
2016032001 ; Serial
604800 ; Refresh
 86400 ; Retry
   2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@   IN  NS  dns.hubapi.myacurite.com.
@   IN  A   Y.Y.Y.Y
*   IN  A   Y.Y.Y.Y
*   IN  ::1


/etc/dhcp/dhcpd.conf should be something like this:

subnet 192.168.100.0 netmask 255.255.255.0 {
  option routers 192.168.100.1;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 192.168.100.1;
  range 192.168.100.100 192.168.100.254;
  default-lease-time 3600;
  max-lease-time 7200;

#  host hub {
#hardware ethernet xx:xx:xx:xx:xx:xx;
#fixed-address 192.168.100.10;
#  }
}


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-02-28 Thread RobbH
That would work, but I'm trying to avoid sending all DNS requests (not 
DHCP) from the entire LAN through a separate server, IF there is another 
way. I still suspect there's some configuration file that would address the 
issue, but a lot of Googling has yet to turn up a solution.

Just to provide a little more information, my LAN is in the 192.168.x.x 
address range. When I set up shared internet through the second ethernet 
port, that port takes the address 10.42.0.1 and the laptop attached to it 
gets an address like 10.42.0.42. Why wouldn't the 10.42.0.x subnet use the 
hosts file of the machine it's hosted on?

It still seems to me that it should work, but I've probably got something 
configured that prevents it from working.



On Wednesday, February 28, 2018 at 12:18:16 PM UTC-5, vince wrote:
>
> On Wednesday, February 28, 2018 at 9:06:42 AM UTC-8, RobbH wrote:
>>
>> My plan was to add a second ethernet port to the Weewx computer, and 
>> "share the internet connection" through that port. I assumed that I could 
>> then add this line to the hosts file on that computer:
>>
>>
>>
> You could do it I think with a raspi running pihole (which is dnsmasq 
> under the hood) assuming you can set your DHCP server's DNS settings so 
> your LAN DHCP requests go to the raspi.  Basically have the raspi take over 
> DNS functionality for your LAN. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: AcuRite bridge and DNS setup

2018-02-28 Thread vince
On Wednesday, February 28, 2018 at 9:06:42 AM UTC-8, RobbH wrote:
>
> My plan was to add a second ethernet port to the Weewx computer, and 
> "share the internet connection" through that port. I assumed that I could 
> then add this line to the hosts file on that computer:
>
>
>
You could do it I think with a raspi running pihole (which is dnsmasq under 
the hood) assuming you can set your DHCP server's DNS settings so your LAN 
DHCP requests go to the raspi.  Basically have the raspi take over DNS 
functionality for your LAN. 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.