Server Fault is a question and answer site for system and network administrators. 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 PC's (two laptops). In one of them (on the laptop) installed Linux Mint 9. It has two interfaces (WAN via Cable and LAN via Wi-fi). I want to configure routing in it to provide access to the internet for second laptop via wi-fi connection. Also I want to put both laptops under the NAT (to give them one outer ip-address and common local network area). (something like: 1-st PC - - LAN address, - WAN address 2-nd PC - - LAN address (2-nd PC has access to the internet)

How to do it?

share|improve this question

Your question does not contain enough information to really answer, and it's really two questions, but here are the two basic things you need to chase. First you need to connect the second laptop by setting the first one in an access point mode or setting up an ad-hoc network between them. Then you have to figure out the routing. Ideally you would setup a bridge with ebtables on the first laptop to simply silently pass everything through to the second laptop as if they were both connected on the same wire. Then they can both connect to whatever upstream router your first one is connected to.

Alternativly you can use iptables on your first lapptop with the nat rules necessary to process things for the second machine and perhaps a dhcp server to give it addresses.

Once you decide on your exact solution you can ask more specific questions about configurations necessary.

share|improve this answer
Thanks! I should use iptables in my situation (this is a task of my lab). – Ilnur Oct 11 '10 at 15:38

Your Answer


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