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 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 directly to localhost.

I already tried

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

Everything I get after disconnecting the wireless network is:

$ ping  
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


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

Browse other questions tagged or ask your own question.