Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2]

Author Topic: Firebrick access to modems for inspecting stats  (Read 7620 times)

aesmith

  • Kitizen
  • ****
  • Posts: 1216
Re: Firebrick access to modems for inspecting stats
« Reply #15 on: January 09, 2016, 03:54:07 PM »

Just had a quick browse of the Firebrick manual - do I detect a touch of the A&A "NAT is Evil" viewpoint?

Anyway I was considering not the path from your devices to the modem, but the return.  Let's say your device was x.x.x.x/26, and the D-Link modem has it's default IP settings of 192.168.1.1/24 and just for illustration we've configured the FB interface as 192.168.1.2.   The Firebrick will see both these subnets as directly attached, and from what you say it will route between them without explicit configuration.   So your packet from x.x.x.x will reach the modem, but how does the modem know how to route back to x.x.x.x?   What I'm suggesting is to NAT your source address, so that the packet hitting the modem appears to originate from 192.168.1.2, which is on the modem's local subnet and therefore reachable directly.   Does that make sense?   

In Cisco terms (sorry) you'd mark your LAN as "inside", the interface to the modem as "outside", then you'd configure inside source nat.

If you can configure the modem (in this example) with a default gateway of 192.168.1.2 then NAT is not required and it's just plain old routing.

Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick access to modems for inspecting stats
« Reply #16 on: January 09, 2016, 04:23:40 PM »

> how does the modem know how to route back to x.x.x.x?   
Absolutely, I don't think it does. That snippet given to me was part 2 of 3 if my understanding is correct.

>What I'm suggesting is to NAT your source address, so that the packet hitting the modem appears to originate from 192.168.1.2, which is on the modem's local subnet and therefore reachable directly. Does that make sense?   

That solves the problem of the modem not knowing what its default gateway is. But surely more NAT would be needed to map the returning packet from the modem to an accessible public IP, not in RFC1918. Which I could do if I can work out how.

I also have no clue what table 1 is in the first snippet.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick access to modems for inspecting stats
« Reply #17 on: January 09, 2016, 04:35:09 PM »

I could just ask RevK to do it for me. Because I am completely and utterly out if my depth. I need to work out s plan for security testing in the result. An I probably ought to set strong passwords on the modems but really I don't want to as I would have to remember somehow to make sure this is done on a swapout when I am in a panic anyway after a lightning strike. It would be better to not have to be relying on passwords, by firewalling access to the modems so that the whole LAN is not allowed to see them, just selected IPs. Maybe that's a hole in itself as knowledge of the sacred IP lets you in. Perhaps I'm stuck with passwords anyway or perhaps doing both is the best way.

I'd like to set up a monitoring device if I can get this to work. It ought to be a Raspberry Pi, I am so desperate for an excuse.  ;D :-[
Logged

aesmith

  • Kitizen
  • ****
  • Posts: 1216
Re: Firebrick access to modems for inspecting stats
« Reply #18 on: January 09, 2016, 05:17:56 PM »

That solves the problem of the modem not knowing what its default gateway is. But surely more NAT would be needed to map the returning packet from the modem to an accessible public IP, not in RFC1918. Which I could do if I can work out how.

Caveat - lack of specific Firebrick knowledge.  However I've never seen any form of NAT that didn't match the reply traffic and apply appropriate translation.  I think that's the only way that dynamic NAT and especially port translation could work.  So assuming the FB is at least halfway normal, the paths would be ..

Oubound
      Host sends ... src=x.x.x.x dst=192.168.1.1
  Modem receives ... src=192.168.1.2 dst=192.168.1.1
Return
    Modem sends ... src=192.168.1.1 dst=192.168.1.2
  Host receives ... src=192.168.1.1 dst=x.x.x.x


I don't see a security issue, only packets destined for 192.168.1.1 will get to the modem, and they can't traverse the Internet.  For belt and braces you could apply a rule that only permitted your source subnet to send to the modem, and only permits the modems to talk to your subnet in return.  However I can't see that's needed. 
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick access to modems for inspecting stats
« Reply #19 on: January 09, 2016, 05:47:29 PM »

Tony, in your example below, how would we generalise that to three modems? It's unclear how the firebrick would know which 192.268.1.1 is which, unless we do an additional something earlier.
Logged

aesmith

  • Kitizen
  • ****
  • Posts: 1216
Re: Firebrick access to modems for inspecting stats
« Reply #20 on: January 09, 2016, 06:44:59 PM »

The other two modems would need to have their IP addresses changed so that there are three separate Firebrick to Modem subnets.   What I'd suggest is going ahead with just one in the first place to prove it all works, and that one might as well stay on it's default settings.   If it all works I'd configure the three modems, then configure your spare onto a fourth subnet, then it can replace either of the three with only Firebrick changes needed to reinstate management access.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick access to modems for inspecting stats
« Reply #21 on: January 09, 2016, 07:10:50 PM »

Is there a way to do it without changing the management i/f IP of each modem? Could we be a little more creative with more use of NAT ?
Logged

aesmith

  • Kitizen
  • ****
  • Posts: 1216
Re: Firebrick access to modems for inspecting stats
« Reply #22 on: January 09, 2016, 07:32:11 PM »

I wouldn't think there'd be a way for the Firebrick to have the same address visible on different interfaces.  Ultimately the physical interface of the FB needs to have an address on the D-Link's subnet.   I thought I had an idea, but it fell to pieces when I thought it through.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick access to modems for inspecting stats
« Reply #23 on: January 09, 2016, 07:49:45 PM »

> Ultimately the physical interface of the FB needs to have an address on the D-Link's subnet.
True, but could we rewrite the source address of packets coming from 192.268.1.1 differently in each subnet? I'm not sure there's a way to that because I don't know how you would specify it.

Mind you, if you define 'interfaces', then you can specify the name of the interface as an attribute to match against in a firewall rule. Then you could make rules that don't apply to multiple modems.
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Firebrick access to modems for inspecting stats
« Reply #24 on: January 09, 2016, 09:25:27 PM »

Just throwing an idea up into the air and seeing how it lands . . .  :-\

If you do not want to change the IPv4 address of the management interface of the three D-Link modems, would it be possible to specify which modem to be addressed by its hardware MAC?

Granted, if/when you need to swap out a zapped/fried modem for a new one (from your stock cupboard), you would need to note its hardware MAC (from the label on the bottom of the modem) and enter that value into the appropriate line of your FireBrick's configuration file.
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick access to modems for inspecting stats
« Reply #25 on: January 09, 2016, 09:34:08 PM »

Burakkucat, you can have rules with a MAC address attribute match, but as you said, it would make swapouts a nightmare. I would need to keep the process of modem swapout simple. For  example: when I am in hospital, Mrs Weaver can just take a modem, preconfigured by Andrews and Arnold to be a modem only, straight from the spare kit shelf and stick it in in place of one tweaked by lightning.
« Last Edit: January 09, 2016, 10:05:36 PM by Weaver »
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Firebrick access to modems for inspecting stats
« Reply #26 on: January 09, 2016, 09:56:58 PM »

Nods in acknowledgement.
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.
Pages: 1 [2]
 

anything