Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to configure my backup solution (bacula) to run backups against laptops which may be either on the local network or connected over a VPN.

My router is a DD-WRT setup, and I have the VPN configured using PPP. I am able to connect my laptop to the VPN, see all network resources from the laptop, etc.

I have configured DD-WRT to assign a static IP (192.168.1.100) to my laptop (named helix), and I've configured PPP to assign IPs in the range 192.168.1.200-210. This works fine.

However when my laptop is connected via VPN I can't nslookup it and get it's actual address:

root@scorpius:/etc/bacula# nslookup helix
Server:         127.0.1.1
Address:        127.0.1.1#53

Name:   helix.dibnatri.net
Address: 192.168.1.100

Pinging it by name obviously won't work here either:

root@scorpius:/etc/bacula# ping helix
PING helix.dibnatri.net (192.168.1.100) 56(84) bytes of data.
From scorpius.dibnatri.net (192.168.1.90) icmp_seq=1 Destination Host Unreachable
From scorpius.dibnatri.net (192.168.1.90) icmp_seq=2 Destination Host Unreachable
From scorpius.dibnatri.net (192.168.1.90) icmp_seq=3 Destination Host Unreachable

For this current session, helix has been assigned the IP 192.168.1.201:

johnd@helix:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr [redacted]
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:359 errors:0 dropped:0 overruns:0 frame:0
          TX packets:359 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:42818 (42.8 KB)  TX bytes:42818 (42.8 KB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:192.168.1.201  P-t-P:192.168.1.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:685 errors:0 dropped:0 overruns:0 frame:0
          TX packets:725 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:21035 (21.0 KB)  TX bytes:22061 (22.0 KB)

wlan0     Link encap:Ethernet  HWaddr [redacted]
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::4e80:93ff:fe0c:f3a0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1430  Metric:1
          RX packets:2618 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2217 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1649082 (1.6 MB)  TX bytes:250296 (250.2 KB)

And I am able to ping it by IP:

root@scorpius:/etc/bacula# ping 192.168.1.201
PING 192.168.1.201 (192.168.1.201) 56(84) bytes of data.
64 bytes from 192.168.1.201: icmp_req=1 ttl=63 time=78.7 ms
64 bytes from 192.168.1.201: icmp_req=2 ttl=63 time=156 ms

But I won't know that IP ahead of time, and I'd much prefer to simply be able to ping helix and hit it no matter how it's connected.

Ultimately what I would like to be able to so is configure something (networking, ppp?) so that helix will resolve to whatever IP the laptop currently has -- be it on the local network or on the VPN.

For example, if helix is on the local network then I would get:

root@scorpius:/etc/bacula# nslookup helix
Server:         127.0.1.1
Address:        127.0.1.1#53

Name:   helix.dibnatri.net
Address: 192.168.1.100

But if it's on the VPN (and assigned .201) then I would get:

root@scorpius:/etc/bacula# nslookup helix
Server:         127.0.1.1
Address:        127.0.1.1#53

Name:   helix.dibnatri.net
Address: 192.168.1.201

The reason I want this is so that I can configure the backup to run over VPN or over the local network agnositcly, without bacula thinking that they are really two different machines.

How can I resolve this?

Note: everything in this case is Linux, but I will eventually need to also configure this to work for Windows laptops as well.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.