Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]Connecting Gentoo Computer to Another Computer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
RanonD
n00b
n00b


Joined: 03 Feb 2012
Posts: 2

PostPosted: Fri Feb 03, 2012 11:05 pm    Post subject: [solved]Connecting Gentoo Computer to Another Computer Reply with quote

Essentially, I have a Gentoo laptop that I've recently managed to finish installing. It's still without a gui, so I only have the command line to work with. I am trying to connect it via Ethernet to my Macbook Pro, which is connected to my wireless router to the ISP. I want to have the Macbook Pro share its connection to the Internet with the Gentoo laptop. I had this working with Fedora, before I started installing Gentoo on the same laptop, and with the network connection I had with the minimal installation CD.

My problem now is that I cannot figure out how to set up the laptop to now do what it used to do with Fedora, which I had set up before with the NetworkManager in Gnome. I'm at the point where I can ping the Macbook Pro and the router, but I cannot ping any Internet websites, including just the IP addresses.

I've been mostly toying around with the /etc/conf.d/net. Below is what I have now which allows me to ping the router.

Code:

config_eth0="192.168.6.3 netmask 255.255.255.0 brd 192.168.6.255"
routes_eth0="192.168.1.1 via 192.168.6.2"


The 192.168.6.3 is the static IP I assigned the Gentoo Machine.
The 192.168.6.2 is the static IP I assigned the Macbook Pro.
The 192.168.1.1 is the IP of the router.

I know I need to put the IP address assigned to the router from the ISP somewhere, I just don't know exactly where or how. Any help will be greatly appreciated.

Sorry, I'm still very new to Linux.


Last edited by RanonD on Sat Feb 04, 2012 3:22 am; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23066

PostPosted: Sat Feb 04, 2012 12:12 am    Post subject: Reply with quote

It looks like you may not have a default route set, in which case the system only knows to forward traffic to the Macbook for those specific subnets you marked as routed. If so, this would explain why you do not have Internet access. As a temporary fix, you can ip route add default via Macbook. For a long term fix, modify your /etc/conf.d/net to set a default route when you bring up eth0.
Back to top
View user's profile Send private message
RanonD
n00b
n00b


Joined: 03 Feb 2012
Posts: 2

PostPosted: Sat Feb 04, 2012 12:44 am    Post subject: Reply with quote

Hu wrote:
It looks like you may not have a default route set, in which case the system only knows to forward traffic to the Macbook for those specific subnets you marked as routed. If so, this would explain why you do not have Internet access. As a temporary fix, you can ip route add default via Macbook. For a long term fix, modify your /etc/conf.d/net to set a default route when you bring up eth0.


So changing routes_eth0="192.168.1.1 via 192.168.6.2" to routes_eth0="default via 192.168.6.2" will allow internet access? Is there anything more that I would need to add? I'll have to change it when I get home, then to be certain. Thanks.

Then putting the IP address assigned to our router by the ISP should be put in /etc/resolv.conf?

Edit: Looks like that's the last time I deviate from what the handbook says. Thanks a lot for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum