Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two network interfaces on a laptop running Ubuntu 12.04. The wired interface is plugged into a wirless router on the network and then wireless interface is connected to an ad-hoc network on the network.

I want to connect another machine to the wireless router and have the data be routed to the ad-hoc network. So the other machine will get an address like and it should be able to send data to the ad-hoc network say to machine

I've tried simply changing the /etc/network/interface text file, but I really don't know what I am doing there, and I tried installing some bridging software and that doesn't seam to help.

Any ideas? Thank you.

share|improve this question

migrated from Sep 28 '12 at 8:06

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

The problem with this setup is that your router can not route packets to the network because it is not configured to forward packets to that network. I assume you have a standard home router such as Dlink, Netgear, Linksys, Belkin, and not a hardcore commercial CISCO router. What you need to do in order for another machine to reach the ad hoc device is to setup NAT masquerading using IPTABLES. Using NAT you will reach hosts in the network, but only the ports that you specify. This is often referred to as port forwarding. Depending on the protocols you would to use, TCP,UDP etc the specific settings vary. Here is a good page that will get you started:

share|improve this answer
Thanks for the great link! I will try it out and let you know how it goes! – Matthew Sep 26 '12 at 1:33

Your Answer


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

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