Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using a machine (Ubuntu 12.04.3 LTS x64) with only WLAN network access running a MythTV server.

The machine is used as a video recorder. The MythTV backend is accessed by the IP address 192.168.2.124 bound to wlan interface. In case of wlan disconnection, recording television would not be possible.

Therefore I want to redirect connections from my machine to 192.168.2.124 directly to localhost.

I already tried

  • adding a line to the file /etc/hosts (127.0.0.1 192.168.2.124)
  • $iptables -t nat -A OUTPUT -d 192.168.2.124 -j DNAT --to-destination 127.0.0.1

Everything I get after disconnecting the wireless network is:

$ ping 192.168.2.124  
Network is unreachable

Am I missing something?
Thank you

share|improve this question
    
What do you mean by disconnecting the wireless network - do you turn off the interface off hardware-wise (like a switch in a laptop), disable it software-wise (say, ip link set wlan0 down) or is it down on the other side (a router being down or turned off)? Also, is the IP address configured in /etc/interfaces or given to the machine by DHCP server? –  moon.musick Aug 29 '13 at 18:51

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.