1

I have a Mac with WiFi connected to a router, internet works just fine there. I also have a PC with Linux Mint, and no wireless network card, so I connected them with a cable one to the other. Have enabled internet sharing at the Mac. I have also run sudo sysctl -w net.inet.ip.forwarding=1 and sudo sysctl -w net.link.ether.inet.proxyall=1

Now they have their own LAN - from the Linux machine I can connect to the default gateway (192.168.3.1) and I see a webpage I setup on the mac which only displays "It works". But when I try to connect from the Linux machine to somewhere else I don't get a respond. For example when I try to get to the router at 192.169.2.1 the Linux fails, and the Mac displays the routers login page. Notice, they are on different LANs, since the network-mask is 255.255.255.0 (for both).

I don't really care if at the end they'll be connected at the same LAN or not. I just want the Linux machine to have internet access.

0

Did you remember to set up, on the Linux machine, routes and DNSs? For the route:

 sudo route add default gw 192.168.3.1

and for the DNSs you will have to edit as sudo the /etc/resolv.conf file, and add:

 nameserver 8.8.4.4
 nameserver 8.8.8.8

or whichever DNS you care to choose.

  • I did the route command now, the nameservers seem to bee OK. But still the same. And I don't think that nameservers are the problem, since I cannot reach my router at 192.168.2.1. – Ramzi Kahil Nov 30 '13 at 14:48
  • @Martin The reason why I asked about DNS is that, if you are able to reach your gateway, now I would like to know whether you can reach any outside site, not an internal one. Can you? – MariusMatutiae Nov 30 '13 at 15:27
  • Well the physical connection goes like this PC->Mac->home router. From the PC I can reach the Mac, but not the home router. – Ramzi Kahil Nov 30 '13 at 16:02
  • I thought you said you could reach 192.168.3.1, and I had thought that was your home router. Could you please post the routing tables and ifconfig for both host and guest? – MariusMatutiae Nov 30 '13 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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