Hi! 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?
-
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.
Ilnur : Thanks! I should use iptables in my situation (this is a task of my lab).From Caleb
0 comments:
Post a Comment