Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
share internet / files over crossover cable
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
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Sat Oct 29, 2005 5:01 pm    Post subject: share internet / files over crossover cable Reply with quote

i have two gentoo boxes i was wondering how i could connect them to share the internet / files etc. i tried this http://www.gentoo.org/doc/en/home-router-howto.xml
but its for a dedicated box and i just want to link one to the other i was able to get the boxes talking to each other but couldnt get any of them to ping any websites. when i broought the eth0 on the 2nd box i cant access the internet from the first anymore,and the second wont ping any websites. any programs or ideas would GREATLY appreciated. i have a dynamic ip its usually in the range of 69.210.X.X my dsl modem is at 192.168.0.1. the pc that the modem is connected to has two nics and they both work. the nic in the second box works fine too. first box in runnig gentoo sources 2.6.13.4 second is runnig 2.6.14 nitro-sources.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Sat Oct 29, 2005 5:23 pm    Post subject: Reply with quote

seren,

To share files, you need to give the interfaces at the ends of the crossover cable different static IPs in the same subnet but a different subnet to the one in use for the internet.
Then build the nfs filesystem into the kernel at each end and emerge net-fs/nfs-utils at each end
On the host PC create an /etc/exports to export the filesystem you want to share
Code:
man exports
will tell you what you need to put in the /etc/exports file
On the client PC mount the shared filesystem - put it in /etc/fstab if you want.
Code:
man mount
the bit about nfs will tell you about mounting the exported filesystem

Sharing the internet is a bit harder. If your internet PC is already behind a router, on a private IP range its much easier, since you do not need to provide Network Address Translation to the second PC.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Sat Oct 29, 2005 5:25 pm    Post subject: Reply with quote

the host pc is directly connected to the adsl modem, my connection uses dhcp. thanks for the quick reply, ill work on sharing files for now.
Back to top
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Sun Oct 30, 2005 9:34 pm    Post subject: Reply with quote

hard to believe no one knows how to, tryed, wanted get this running. or maybe its a stupid n00b networking question? but i have searched and searched and i can't find nothing. i would REALLY appreciate any help or suggestions. thanks james
Back to top
View user's profile Send private message
JSharku
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 189
Location: Belgium

PostPosted: Mon Oct 31, 2005 12:01 am    Post subject: Reply with quote

Uhm, I don't understand why you can't use the info given in the home router guide? It assumes a dedicated box as router, yes, but the methods described will work just as good on a machine that you use for other stuff. You say that 1 machine has 2 NICs? Make that one the "router", using 1 card to connect to the ADSL modem, and the other to connect to your second box.

As for sharing files, the easiest way to do that is using NFS:

compile your kernel with support for NFS (under filesystems)
emerge nfs-utils on both boxes
fill out /etc/exports with the directories you want to share
start nfs
mount a shared directory using mount -t nfs box1:/path/to/dir /mnt/dir
You can even put your nfs mounts in fstab so they get automatically mounted at boot.

Sharku
_________________
If only life were portage-driven:
Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Back to top
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Mon Oct 31, 2005 2:45 am    Post subject: Reply with quote

i followed every step in the guide, didnt work, how do i set up the second box? do i need the same things compiles in the kernel? does iptables need to be configures the same? same for dnsmasq? its not very clear.

the part i dont understand is this
# LAN utilizes the private 192.168.0.xxx network
# router is hardcoded to the standard 192.168.0.1 IP
if i go to 192.168.0.1 i get the modem set up page, speed stream modem. so will this conflict with the other pc? how so i knoe that box 1 "router" is "# router is hardcoded to the standard 192.168.0.1 IP"?

sorry if i dont make any sense

thx
Back to top
View user's profile Send private message
suicidal_orange_II
Apprentice
Apprentice


Joined: 04 Sep 2004
Posts: 299

PostPosted: Tue Nov 01, 2005 11:51 am    Post subject: Reply with quote

On the second box give it a static ip of 192.168.0.2, and then type
Code:
route add default gw 192.168.0.1
and it should work. If it does edit /etc/conf.d/net to
Code:
config_eth0=( "192.168.0.2 netmask 255.255.255.0" )
routes_eth0=( "default via 192.168.0.1" )

so it will work on next boot.

If it still doesnt work (as i have found before while following the router guide) i recommend fw-jay (http://sourceforge.net/projects/firewall-jay, but its not in portage. Sourceforge has a mysql error for me at the moment so you cant goto the homepage to read the instructions. Im sure they will fix it soon tho

good luck :)

[EDIT]
Can you confirm that you have a modem not a router connected to the box you want to use as a router? Seems strange to have the modem with a 69.210.X.X IP and say it is on 192.168.0.1 for the config.

If it is a router, change the ip on the router box to 192.168.0.3 and change the route to
Code:
route add default gw 192.168.0.3
and in /etc/conf.d/net to
Code:
config_eth0=( "192.168.0.2 netmask 255.255.255.0" )
routes_eth0=( "default via 192.168.0.3" )
Back to top
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Tue Nov 01, 2005 5:14 pm    Post subject: Reply with quote

its modem straight to the computer, the modems configure address is 192.168.0.1, what i meant was when dhcp gets me the ip address for internet its usually 69.210.*.*
thanks for the reply ill try it soon currently emerging gcc-4.0.2 on reiser4 and its going soooooooooo smooth i cant wait =).
Back to top
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Wed Nov 09, 2005 6:48 pm    Post subject: Reply with quote

glad you all cared to help but i got help in another forum actually it was the kororaa forums and the funny thing is i DONT use kororaa on those boxes, gentoo mods got a stick up their you know what because they banish members from posting about kororaa on gentoo forums but kororaa has not problem with helping this is ass backwards thank you mods...................... get a grip
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Wed Nov 09, 2005 8:50 pm    Post subject: Reply with quote

seren,

We even help Windows users here ...
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Thu Nov 10, 2005 5:58 am    Post subject: Reply with quote

they why are all the kororaa threads thrown in off the wall????

https://forums.gentoo.org/viewtopic-t-380415-postdays-0-postorder-asc-start-50.html

and i have heard from users of kororaa that they have been rejected from the forums because kororaa "isnt gentoo"

http://kororaa.org/phpBB/viewtopic.php?t=98
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