LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   networking question (https://www.linuxquestions.org/questions/slackware-14/networking-question-664575/)

http:// 08-22-2008 07:08 AM

networking question
 
hello,

is it possible to connect two computers using this particular configuration and then have them share an internet connection?

i apologize, i dont know the technical terms to use so i cant start researching on the topic. i just need help on the terms and verify if this could work so that i can look up the procedure on my own. :)

the configuration:

-a laptop with wireless internet using slackware 12.1 connecting on a out of site wireless router.

-connected into it is another laptop using debian etch(no wireless card) by a LAN wire (i dont know what its really called) and sharing(?) the internet access of the laptop with slackware on it

i really need to set it up on this particular config, is this possible? and if it is, is there a particular term that i can use so that i could research how to go about it?

thank you for your time,

mikel

gbonvehi 08-22-2008 07:29 AM

It is possible. Try something searching something like: linux sharing internet connection
Related terms: masquerade, NAT, iptables

The cable you're using (or should) is called crossover cable, it has the connectors reversed (you can peek at their colors) and is used for that kind of connections.

pinniped 08-22-2008 08:06 AM

To make life easier, configure dhcpd and BIND9 on Slack - that allows Slack to act as the DNS and also to give your Debian machine a local IP address. You also need to set up the iptables rules; I don't know what tools are available to you on Slack, but on Debian I just run a script named "ipmasq". It's probably better to not be lazy and write your own script to set up the iptables because you have better control over things.

If you will only ever connect in this configuration given that one wireless access point, you can skip DHCP and BIND9 and just statically set up the Debian NIC:
- fixed address
- gateway = slack computer
- DNS = wireless router IP address or fixed DNS on the internet

Using DHCPD + BIND9 allows you to create all the right connections even if your slack computer is doing wireless roaming - the slack machine will be aware of all changes, but the Debian machine won't see any changes at all - as far as it is concerned, the slack machine does all the DNS and gateway stuff.

pinniped 08-22-2008 08:08 AM

Quote:

Originally Posted by gbonvehi (Post 3255912)
The cable you're using (or should) is called crossover cable, it has the connectors reversed (you can peek at their colors) and is used for that kind of connections.

It's a little more complicated than that - not all wires are crossed on a crossover, and on a non-crossover some wires are still crossed. You can tell the difference easily when you've been working with them for a while, but things aren't as simple as suggested in the quote above.

gbonvehi 08-22-2008 08:21 AM

Quote:

Originally Posted by pinniped (Post 3255946)
It's a little more complicated than that - not all wires are crossed on a crossover, and on a non-crossover some wires are still crossed. You can tell the difference easily when you've been working with them for a while, but things aren't as simple as suggested in the quote above.

Thanks for additional info pinniped, I'm aware of that. I just wanted to guide him, not to give full specifications ;)

bgeddy 08-22-2008 08:33 AM

Quote:

It's a little more complicated than that - not all wires are crossed on a crossover, and on a non-crossover some wires are still crossed. You can tell the difference easily when you've been working with them for a while, but things aren't as simple as suggested in the quote above.
This should help identify your cables http://www.homenethelp.com/web/expla...-crossover.asp

Also have a look at Alien Bob's script http://www.slackware.com/~alien/efg/ and the classic (but in depth) reference by Oskar Andreasson http://iptables-tutorial.frozentux.n...-tutorial.html

Quote:

To make life easier, configure dhcpd and BIND9 on Slack
I use dnsmasq rather than bind for dhcp and dns services. It's easy to setup and comes with Slackware - so does bind for that matter. For just one machine however it may be overkill.

rob.rice 08-22-2008 08:50 AM

read this /usr/doc/Linux-HOWTOs/IP-Masquerade-HOWTO and this Networking-Overview-HOWTO and this Network-Install-HOWTO
the first thing you need to do is get the 2 computers talking to each other after that go to /etc/rc.d/rc.ip_forward
and do as it says

pinniped this guy dose not even have the back ground to ask for what he wants forget about hem writing a script to do
IP-masquerading
all your reply would is discourage hem from doing this and more

http:// 08-22-2008 08:56 PM

Quote:

Originally Posted by rob.rice (Post 3255984)
pinniped this guy dose not even have the back ground to ask for what he wants forget about hem writing a script to do
IP-masquerading
all your reply would is discourage hem from doing this and more

hahaha... i'm not discouraged at all rob, in fact i'm really excited about learning this 'new' (for me obviously :) ) aspect of slack, debian, linux and computers. though i doubt i'd be writing my own scripts in the near future, it's certainly a goal for me.

thanks for the guidance everyone!

mikel


All times are GMT -5. The time now is 04:06 AM.