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 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 - 192.168.0.1 - LAN address, 77.157.76.68 - WAN address 2-nd PC - 192.168.0.2 - LAN address (2-nd PC has access to the internet)

How to do it?

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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