AlessioMTX
Posts: 19
Joined: Fri Nov 02, 2012 3:51 pm

[SOLVED] Use a MAC as router for Raspberry Pi

Fri Nov 02, 2012 4:10 pm

Hi all, I' ve a raspberry pi, but at home I haven' t an internet connection and I use a free wifi. To connect Raspberry so I thinked to use my MAC as router, I went in Preferences->Internet and wireless->Share and I checked Share Internet: Share from: Wifi at computer that use: Ethernet.
But Raspberry still doesn' t connect. What should I do?
When I write in Raspberry terminal (LXTerminal)

Code: Select all

ifconfig
there are two result

Code: Select all

eth0
with some infos and

Code: Select all

lo
with some infos, but if I write

Code: Select all

iwconfig
the result of each one is

Code: Select all

Interface doesn' t support scanning.
I' m using Mac os 1.8.2 and Raspberry Pi with Raspbian.

Help me, Thank you!!!
AlessioMTX
Last edited by AlessioMTX on Sun Apr 20, 2014 10:23 am, edited 1 time in total.

starspread
Posts: 4
Joined: Fri Nov 02, 2012 9:38 pm

Re: Use a MAC as router for Raspberry Pi

Fri Nov 02, 2012 9:53 pm

Well, iwconfig is for configuring WLAN, so without a WLAN device, no Wlan configuration.

1. Turn off your firewall in Lion to prevent any interuption.
2. Turn on Internet Sharing in Lion (Share Wlan to Ethernet)
3. Type "ifconfig" in terminal in Lion and see what IP your bridge0 has (should be 192.168.2.1)
4. type "dhclient eth0" in terminal on your Raspberry. If you don't get an IP from Lion try the following.
type "ifconfig eth0 192.168.2.2" and then "route add default gw 192.168.2.1 dev eth0"
5. Now ping a server e.g. "ping 8.8.8.8" (google nameserver) and check if it replies. If everything went well then check if /etc/resolf.conf has a line like "nameserver 8.8.8.8" (or whatever dns-server you prefer) Everything without the quotes " off course.

good luck!
star

AlessioMTX
Posts: 19
Joined: Fri Nov 02, 2012 3:51 pm

Re: Use a MAC as router for Raspberry Pi

Sat Nov 03, 2012 8:09 am

Thank you, I' m going to test it this afternoon!!! :D

AlessioMTX
Posts: 19
Joined: Fri Nov 02, 2012 3:51 pm

Re: Use a MAC as router for Raspberry Pi

Wed Feb 27, 2013 4:22 pm

OK :D now I need to connect my Raspberry Pi to internet with mac, I had the opportunity to use a modem, so I didn't try.
I'm trying now, if I type

Code: Select all

ping -c 5 8.8.8.8
the Raspberry seems connected, but if I try to browse or also try to type

Code: Select all

ping -c 5 www.google.com
as result I have

Code: Select all

ping: unknown host www.google.com
Help me :D What should I do?


AlessioMTX
Posts: 19
Joined: Fri Nov 02, 2012 3:51 pm

Re: Use a MAC as router for Raspberry Pi

Wed Feb 27, 2013 4:39 pm

I know that.. I have problem to connect

starspread
Posts: 4
Joined: Fri Nov 02, 2012 9:38 pm

Re: Use a MAC as router for Raspberry Pi

Wed Feb 27, 2013 7:12 pm

AlessioMTX wrote:I know that.. I have problem to connect
Dude, if it replies with "ping 8.8.8.8" but not with "ping google.com" then your /etc/resolve.conf isn't set correctly. It should have a line like e.g. "nameserver 8.8.8.8" (like i allready wrote previously)

AlessioMTX
Posts: 19
Joined: Fri Nov 02, 2012 3:51 pm

Re: Use a MAC as router for Raspberry Pi

Wed Feb 27, 2013 7:18 pm

Excuse me but you wrote resolf.conf ,so is

Code: Select all

resolve.conf
??

Thank you ;) I'm going to try ;)

AlessioMTX
Posts: 19
Joined: Fri Nov 02, 2012 3:51 pm

Re: Use a MAC as router for Raspberry Pi

Wed Feb 27, 2013 9:47 pm

The right file is

Code: Select all

resolv.conf
I've solved ;)

starspread
Posts: 4
Joined: Fri Nov 02, 2012 9:38 pm

Re: Use a MAC as router for Raspberry Pi

Thu Feb 28, 2013 2:22 am

Haha! Ok, my bad! So you resolved it... :)

AlessioMTX
Posts: 19
Joined: Fri Nov 02, 2012 3:51 pm

Re: Use a MAC as router for Raspberry Pi

Fri Mar 01, 2013 3:54 pm

Yes, thank you :D

Return to “Beginners”

Who is online

Users browsing this forum: jamoere and 71 guests