Page 1 of 1

basic newbie questions about networking on linux

Posted: Sun May 05, 2013 6:05 pm
by Scott65
Hi,

I've been looking for help on sharing an Internet connection for 2 mint boxes. I know it's called Masquerade and it can be done with iptables and ip_forwarding...
What I want to know is, do I need (or can I use) a crossover cable to do that-- and if I can't use one, then how do I share files between the computers?
(right now I'm using Samba)

Do I need to get a hub or switch to do it right? And if so, which one(s) work best with Mint?

Thanks for any help.

Re: basic newbie questions about networking on linux

Posted: Sun May 05, 2013 11:45 pm
by Spearmint2
Just get a router. When you can get them this cheap, why waste money on a crossover cable which will just leave you wanting a router eventually anyway? You gain added protection behind a router and dual ability of LAN port or wireless access.

$14.00 + S&H
http://www.geeks.com/details.asp?invtid ... PB&cat=NET

$15.50 + S&H
http://www.geeks.com/details.asp?invtid ... -R&cat=NET

You could also consider a couple cheap USB wireless fobs which sell for $10 each or less and set up access between two computers that way, be sure to password protect shared folders though, just in case.

Re: basic newbie questions about networking on linux

Posted: Mon May 06, 2013 7:56 am
by Scott65
thanks, but I'm not sure that will work for me. The instructions for the router says to plug it into your DSL/cable modem, but
I don't have a cable modem to connect it to... I have one free connection on one of the PCs, and both PCs are already connected with a crossover cable (that I got for free) and all I need to do is somehow get internet access on the 2nd pc... Can I plug the router into the pc that has the I-net connection instead of a cable modem and it will work? I'd like to have a wireless network because I have a wireless printer but I don't know how to set it up. And it comes with an intallation CD-- for Linux? Have you set up either one of those routers yourself, running Linux?

Also, I have problems with my USB ports on one of these PCs already so I'm not sure if a "fob" (whatever that is) will work either.

Thanks.

Re: basic newbie questions about networking on linux

Posted: Mon May 06, 2013 6:12 pm
by Spearmint2
thanks, but I'm not sure that will work for me. The instructions for the router says to plug it into your DSL/cable modem, but I don't have a cable modem to connect it to...

What sort of internet connection do you have? Cable would connect to the round cable connect on the modem. If DSL you should already have it connected to a modem. From either modem you take the LAN cord (CAT5 cable) and plug into the WAN on back of router instead of the computer. You then should have 4 LAN ports on the router you can use for computers to connect to. Typically you have an internal IP address for the router which you can connect to using a browser. It would be 192.168.1.1 or maybe 192.168.100.1 or something like that. Once there you are presented a sign in screen and at first you'd use the defaults username and password and could change it later for security. Once inside the router program you set the DHCP to automatic and make other settings as desired. There is a learning curve to it.



I have one free connection on one of the PCs, and both PCs are already connected with a crossover cable (that I got for free) and all I need to do is somehow get internet access on the 2nd pc...

You've been using Internet Connection Sharing in Windows?


Can I plug the router into the pc that has the I-net connection instead of a cable modem and it will work?

Explained above. You can google images for "DSL cable to router" and see how to make the connections.

I'd like to have a wireless network because I have a wireless printer but I don't know how to set it up. And it comes with an intallation CD-- for Linux?

Probably not a program on the CD for wireless connect by Linux to the printer, check it's documentation. However, if you assign a static IP address to the printer on the router, then set the program on the printer to the same static IP, then you should be able to access basic printing to it wirelessly while in Linux. For instance I also have a wireless printer which had no driver files for my former windows 2000 setup, but by using "ADD PRINTER" and hooking directly to it's IP address and sending files to print, through the wireless router to it, they came out just fine. You can probably do the same in Linux, but I've not tried it myself yet. Now that I'm curious, I might, but not today. Use the Update Manager in Mint and see if any device specific programs are available for your printer. You can always plug directly to the wireless router, use it as wired instead.

Have you set up either one of those routers yourself, running Linux?


I'm using my router right now on Linux to type this, booted from a flash drive install. I can see the shared folders on my other computer running XP, and that's through the router. I also have a Magic Jack Plus plugged into the router and it's phone plug into a wall jack which allows all my house phones to work, which is cheap phone service on internet, both local and long distance, cost is about $30 per year, plus the initial $60 or thereabouts paid for the device.

Here's a screen capture showing it working in Mint14, on computer's LAN port to router LAN port, and the shares, Naruto is a wireless connection, the other is a second computer connected to the router also from LAN port to LAN port.


Also, I have problems with my USB ports on one of these PCs already so I'm not sure if a "fob" (whatever that is) will work either.

Check your BIOS settings, see if you have all USB ports enabled.

Thanks.

Re: basic newbie questions about networking on linux

Posted: Mon May 06, 2013 6:30 pm
by Spearmint2

Re: basic newbie questions about networking on linux

Posted: Mon May 06, 2013 7:21 pm
by Scott65
I connect to a free WiFi hotspot with a USB hi-gain antenna. So that's why no cable / dsl modem.
I don't use Windows.

I need to turn the laptop into a router now from what I've read, but haven't been able to do that, and supposedly it can be done... I've tried masquerade and editing iptables... just don't know exactly what I need to do in mint yet...

I can turn the laptop connected to the I-net into a local hotspot for my other pc through the built-in wireless card, and I can connect the other computer to it, but it can't access the Internet or any thing else on the computer. The wireless card connects to the ad-hoc hotspot but that's it.
(and I can't connect the other computer to the WiFi hotspot-- besides, I want to be able to share files between the two without having to rely on an internet connection.

It can be done I just need someone who understands ip_fowarding and Masquerade mode in Linux I guess... or if I could connect a router to the pc with Internet instead of the cable modem and somehow run it that way.

The problem with the USB port is a sporatic "unable to enumerate port" error that won't unbind with certain devices... my hi-gain USB antenna is one of those devices... but the antenna works fine with the other laptop, which is why I want to use that one as a server, router / hub / hotspot whatever...

thanks.

Re: basic newbie questions about networking on linux

Posted: Tue May 07, 2013 12:16 pm
by Spearmint2
You need to setup the first computer as a gateway. A Linux server software package might be the best way to go on that. Another option is using an old router with "client" ability hooked to your high gain antenna and then plug the computers into the LAN ports on it. You might could use a Networking Manager program to port the incoming wireless to your LAN port which is connected to the second computer. The problem with a computer in the middle instead of a bridge or router, is that computer must be on all the time when someone wants to use the second computer. That's one reason I quit using the computer only type of magicjack for phone service and moved to the Plus version, so I could turn off all computers and still have phone service (VOIP). Yeah, you can do things using ad hoc mode and peer to peer, but when you can hook in a router or a hub to accomplish the same for very little money, it's just so much easier, and versatile. Good Luck!

Re: basic newbie questions about networking on linux

Posted: Thu Mar 06, 2014 10:56 am
by Spearmint2

Re: basic newbie questions about networking on linux

Posted: Thu Mar 06, 2014 11:13 am
by jahid
you can turn your pc into a working router and share internet connection to both linux-windows, and linux-linux in both ways. follow this tutorial.
though it says linux to windows, it will work for linux to linux too. procedure is same......

and you can of course use a crossover cable to connect your two pc's together. you even can use straight through cable for the same purposes if your ethernet adapter supports it.................


and about the cost, routers are much costlier than the required amount of cable.(61.25:1 in bangladesh, assumed a distance of 15ft between two pc's)

Re: basic newbie questions about networking on linux

Posted: Thu Mar 06, 2014 11:20 am
by Spearmint2
jahid wrote:you can turn your pc into working router and share internet connection to both linux-windows, and linux-linux in both ways. follow this tutorial.
though it says linux to windows, it will work for linux to linux too. procedure is same......
How does that translate to the wireless part though?

Re: basic newbie questions about networking on linux

Posted: Thu Mar 06, 2014 11:36 am
by jahid
Spearmint2 wrote:How does that translate to the wireless part though?
I don't understand your question, can you be a little elaborate?

about the tutorial i referred:
this method is independent on how you connect internet in your main box. whether it's wireless or wired that doesn't matter. only thing matters is that you have an internet connection in one box (in whatever way it may be) and you want to share it to other boxes through crossover/straight through cable, that's all....