LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-08-2005, 12:36 PM   #1
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
two netcards - how to `ISP' second machine?


Hi there.

I have two network cards in my machine. From what I've read in the RFCs, it should be possible to provide an internet connection to my girlfriends laptop (M$ lossdoze XP (is my contempt showing?)), by providing her with a seperate IP and routing all packets w. that IP to her machine.

Am I right? What would I google for? Please provide me with a relevant pointer.

Thanks for your consideration.

--Jonas
 
Old 08-08-2005, 01:02 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Jonas, you've clearly read to Smart Questions guide you pointed another user to earlier.

I guess the question is this... do you want her to have a world-resolvable IP? Does your ISP permit multiple IPs/connection? Most cable companies do (or used to anyway), DSL and dial-up did not.

If not, you need Network Address Translation (NAT/IP Forwarding). This is a very common request for linux to perform. You need iptables with NAT and conntrack support. If you want her to obtain an IP via dhcp, you'll also need a DHCP server. I'd be happy to provide more details on this solution if needed.

If they do allow multiple "real" IPs per account, then you could just put the two machines on a switch/hub. Or set up ethernet bridging, if you'd rather she went through your machine.
 
Old 08-09-2005, 06:57 AM   #3
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Original Poster
Rep: Reputation: 47
I have contacted my ISP (I couldn't find answer on their website).

I have found several dhcp servers w. synaptic, but installed none--I can only really test them when the other machine is here.

I have also googled for iptables NAT conntrack, but haven't found a way to determine if my kernel supports it. How do I determine this?

I read a bunch of docs on bridging; among others that it's not recommended to do it in 2.6 kernels (which I use). Comments on this? How do I determine if I can do ethernet bridging?

In case I didn't make it clear, I want to use the internet at the same time as my gf.

Thanks again --Jonas
 
Old 08-09-2005, 12:30 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Could you refer me to the document that suggests bridging is bad with 2.6 kernels? I'm just curious about that.

Anyway, to check if your kernel supports it, look under Device Drivers > Networking Support > Networking Options > Network Packet Filtering > IP Netfilter Configuation in the kernel config. It's well hidden. The options are named CONFIG_IP_NF_* in the kernel .config.

It seems like we're on all the same threads.
 
Old 08-09-2005, 12:59 PM   #5
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Original Poster
Rep: Reputation: 47
Quote:
refer to .. bad 2.6 kernel
Quote:
originally said by Eric Cartman
I would if I could, you son-of-a-bitch


I tried looking through my history, by didn't find it. It also seemed weird to me at read-time.

I'm running a stock (i.e. not self-compiled) debian kernel. I found /usr/src/linux -> kernel-source-2.6.8 (which I'm running) and connection tracking is enabled in its config. I can't remember installing any kernel-source nor modifying conntrack, so I can't say how relevant my observation is.

Is there a way to determine whether or not my current kernel supports it, using the image/exectuable only?

And just to make it perfectly clear: both options (NAT/bridge) will allow me to use `teh intarweb' at the same time as the other computer?

I assume you've deduced that my ISP only provides me w. one ethernet plug (otherwise, I'd have tried plugging my gf into the other).

Once again, thx --Jonas
 
Old 08-09-2005, 05:44 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Stock debian kernels provide NAT as modules, IIRC.
Code:
find /lib/modules/`uname -r`/ -name 'ipt_*'
NAT will work with all ISPs, and yes, both of you can be online at once. I have my little "lab" of computers all on one DSL connection here.
 
Old 08-14-2005, 07:11 PM   #7
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Original Poster
Rep: Reputation: 47
I've checked with my ISP: I *can* grab two IPs, so I'm probably going to do that. I found an ethernet bridging howto, explaining how to enable it in terms even *I* can understand . Consider that subproblem solved.

Where can I find a guide to NATting?

--Jonas
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 10:20 AM
how to open a dilog on local machine when i do ssh to remote machine fahad26 Programming 3 05-03-2005 07:39 PM
about setting my dual netcards Rex_chaos Linux - Hardware 1 04-18-2005 11:07 PM
Changing ISP, apt-get can not see new ISP proxy linx win Debian 0 01-05-2005 03:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration