0

What is the easiest way (that doesn't involve changing the IP of my terminal or my router) to access a subnet that neither of these devices are operating on?

The router broadcasts 192.168.1.0-255, in which my terminal sits. And I have a device with a static IP somewhere in the 10.0.0.0-255 range that sits on the local side of the external gateway but on the WAN-side of the router - I have surmised that it is a bridge of some kind, as the network refuses to cooperate without it.

My knowledge of static routes is limited - but I've attempted to add one for 10.0.0.0/24 to my external gateway in accordance with similar problems I've googled, though it didn't help the situation any - I assume either because I set up the route wrong, or because it's not a feasible solution for this problem.

I want to preserve the 192.168.1 subnet precisely the way it functions today, while also being able to talk to the 10.0.0 device. If static route does not work here, what is your most clever solution to a situation of this sort?

Toplogy edit:

External Gateway --> 
    10.0.0.1 (bridge device) --> 
        192.168.1.1 (router) --> 
        192.168.1.5 (switch) --> 
        192.168.1.10 (terminal)

Routing table

Destination     Gateway    Flags    Use     Mtu     Netif
default         80.213.4.1  UGS    30655    1500    re0 
8.8.8.8         80.213.4.1  UGHS   2        1500    re0 
10.0.0.0/24     80.213.4.1  UGS    6183     1500    re0 ' <--?
80.213.4.0/22   link#1      U      12785    1500    re0 
80.213.4.124    link#1      UHS    0        16384   lo0 
127.0.0.1       link#7      UH     59       16384   lo0 
130.67.15.198   80.213.4.1  UGHS   0        1500    re0 
192.168.1.0/24  link#3      U      212101   1500    re2 
192.168.1.1     link#3      UHS    0        16384   lo0 
192.168.2.0/24  192.168.2.2 UGS    0        1500    ovpns1  
192.168.2.1     link#8      UHS    0        16384   lo0 
192.168.2.2     link#8      UH     0        1500    ovpns1

enter image description here

Nmap scans:

nmap -sP 10.0.0.0/24
nmap -sn 10.0.0.0/24
nmap -sL -n 10.0.0.0/24

All scans either return nothing or every IP in the subnet.

Latest edit:

I located the device, but have yet to establish a connection. On the router (192.168.1.1):

[admin@purgatory.vegardindustries.com]/root: ifconfig re0 add 10.0.0.2/24
[admin@purgatory.vegardindustries.com]/root: ifconfig -a
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        ether 14:cc:20:06:5e:0e
        inet6 fe80::16cc:20ff:fe06:5e0e%re0 prefixlen 64 scopeid 0x1
        inet 80.213.4.124 netmask 0xfffffc00 broadcast 80.213.7.255
        inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
[admin@purgatory.vegardindustries.com]/root: arp -a
[...]
? (10.0.0.2) at 14:cc:20:06:5e:0e on re0 permanent [ethernet]
? (10.0.0.1) at cc:5d:4e:9c:ad:c0 on re0 expires in 328 seconds [ethernet]
  • It's not really clear what you're asking, or what you've tried. If it's on the WAN side, then just surf to it....? What's happening when you try? Keep in mind: 10.x.x.x are considered private IP addresses, so your router may not be willing to route to it.... – Ƭᴇcʜιᴇ007 Jan 3 '17 at 16:06
  • The router and the device aren't on the same subnet, so I can't surf to it. I am asking how to communicate between the subnets, á la a the functionality I thought static route would give me. I have tried adding a static route, but I was unsuccessful. – Vegard Jan 3 '17 at 16:18
  • 1
    Every computer you access on the Internet is in a different subnet, how do you think you're access those? The default routing in your router will most likely be something to the effect of "For every address not on this LAN try WAN". – Ƭᴇcʜιᴇ007 Jan 3 '17 at 16:24
  • Yes, that was my point - the router doesn't "know" how to route to it, and I am trying to rectify that situation. Adding a static route for 10.0.0.0/24 didn't solve anything, causing me to ask here. – Vegard Jan 3 '17 at 16:28
  • "Adding a static route for 10.0.0.0/24 didn't solve anything, causing me to ask here" please edit your question and add this important info, along with anything else you've already tried, and what the results were of those trials. – Ƭᴇcʜιᴇ007 Jan 3 '17 at 16:32
2

Add a route, to your router for the gateway to access that device.

You'll likely find it in the static routing section of PFsense, but it's a long time since I've used it. Also, you'll need to make sure the filtering of 'private' addresses is turned off (I believe it's on by default in pfsense) as you wouldn't normally expect to see that IP range on the 'WAN' side of your router.

  • Thanks for the input. I'm not filtering private networks. I already tried adding a static route for 10.0.0.0/24, but that seemed to not work. I guess my real question is narrowing down to what I am doing wrong when creating the route. – Vegard Jan 3 '17 at 16:25
  • By default I think the routes will be added on the lan side, you need to specify it exists on the wan side. – djsmiley2k Jan 3 '17 at 16:51
  • The route shows up with WAN as its interface. – Vegard Jan 3 '17 at 16:57
1

What is the easiest way (that doesn't involve changing the IP of my terminal or my router) to access a subnet that neither of these devices are operating on?

In Linux, an interface can have 2 or more IP addresses.

ip addr add 192.168.99.1/24 dev eth0

for example. It won't disturb any existing IP address. If you can get a shell to this device try it.

Remove it by replacing add above with del.

If your default route can't route to that subnet, which is likely - it's been a while since I did this but I think you get a "free" route to, for example, 192.168.99.0/24 just by virtue of the above (a "directly connected" route).

If you have issues clear your ARP table with an arp -d from a root shell.

  • I seem to be able to access 10.0.0.0/24 having used the BSD equivalent of your suggestion. I haven't found the device yet, but I have a few things to verify. Thanks a lot! – Vegard Jan 3 '17 at 17:48
  • Turns out the device now shows up in the router's ARP table, but it isn't reachable by anything on 192.168.1.0. Is that normal? Another user mentioned a "route back" that, if lacking, might impede the connection. – Vegard Jan 3 '17 at 17:59
  • Ok ... after thinking - normally you want disparate subnets to not talk to each other without a router in between. Try adding a route to 10.0.0.0/24 through that interface to see if it works. If not, you are looking at having to set up IP forwarding or use something like rinetd to "manually" forward if you can set that up on this device. – LawrenceC Jan 3 '17 at 18:03
  • When you say "add a route to 10.0.0.0/24", do you mean something other than the route I've already added (table and screenshot in OP)? – Vegard Jan 3 '17 at 18:07
  • Nope, that's what I was talking about. I bet you need something in the middle to forward it. Only other thing I can think of that could possibly be relevant is "policy routing" but that's only if you want 2 sets of IPs in the same subnets to be affected by 2 different routing tables. Not sure if that will help. Sorry. :( – LawrenceC Jan 3 '17 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.