LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to do: using a linux comp to act as router for a windows comp (https://www.linuxquestions.org/questions/linux-networking-3/how-to-do-using-a-linux-comp-to-act-as-router-for-a-windows-comp-287873/)

grimhammer 02-08-2005 06:19 PM

how to do? using a linux comp to act as router for a windows comp
 
Hi all.

I'm running slackware 10.0 with gnome 2.6 on a computer with dual network cards, one external PCI and one integrated on the motherboard. I'm also running a windows 2000 with a single integrated card. All three cards work, in the matter of hardware, so that's checked.

Now, what I want to do is to connect one of the cards on the slackware comp to my internet, the other card to the windows comp and share the connection between the two computers, so that they can both use it.

I've checked the status of the cards with ifconfig and they're all there, question is, how to do it all? I'm recently converted and if this is solved i'm a slacker for life :D

I've checked around a little but haven't yet found anything that can help me. Anyone know where to start in this mess? Like I said, I'm rather new to this.

*edit* If you need any other information I'd be happy to supply it :)



If you want the output from ifconfig, here it is:

eth0 Link encap:Ethernet HWaddr 00:80:48:1E:A7:A2
inet addr:194.47.142.113 Bcast:194.47.143.255 Mask:255.255.254.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:51384 errors:0 dropped:0 overruns:0 frame:0
TX packets:6009 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10610200 (10.1 Mb) TX bytes:742159 (724.7 Kb)
Interrupt:12 Base address:0x5000

eth1 Link encap:Ethernet HWaddr 00:07:95:CA:F4:C7
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:99 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23386 (22.8 Kb) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x7000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:326 errors:0 dropped:0 overruns:0 frame:0
TX packets:326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24076 (23.5 Kb) TX bytes:24076 (23.5 Kb):) :) :)

Bent Wookie 02-09-2005 10:17 AM

I would suggest something like gshield, available at http://muse.linuxmafia.org/gshield/

I used it before deciding to dedicate an old Pentium classic machine with 4 ethernet interfaces to IPCop (http://www.ipcop.org/).

There are simpler scripts around, but why not protect the poor windows box from instant ownage by running a halfway decent firewall.

Have fun! You might learn something about iptables in the process - I sure did.

fr_laz 02-09-2005 10:29 AM

The hard (but the best ;) way :
http://iptables-tutorial.frozentux.n...-tutorial.html
http://www.ds9a.nl/2.4Networking/howto/

I know that's a bit of reading... but it answers lots of questions

grimhammer 02-09-2005 01:32 PM

well, I'm pretty much just sitting here, scratching my head.

If I just want to get it to work before going under with those, can't it be done with route and ifconfig? Should be pretty easy, but I just can't get it to work :(

Current setup:
windows box ip : 192.168.0.10
linux box ip (leading to win box) : 192.168.0.1
linux box ip 2 (to the net, duh) : 194.47.142.113

now if I just want the traffic from the windows box to be redirected to 194.47.142.113, how would I accomplish that?

troycus 02-09-2005 02:46 PM

I've been tring to do something similar to what your doing for the longest time but to know avail.

I have DSL, i'm using linux redhat 9.0 and windows xp. I want to use the linux box as the main connection to the internet and my xp box to share the internet connection vis of a hub. My linux box has 2 ethernet cards installed. Eth0 is connected to the internet while eth1 is connected to the hub. I have my xp box connected to one of the ports in the hub.

The problem I'm running into to is that my linux box can connect to the internet through eth0 with know problem. when I turn on the second ethernet card eth1 I loose my internet connection. When I turn eth1 off I get my internet connection back.

~=gr3p=~ 02-09-2005 09:18 PM

hey is this what you looking for:

http://207.58.143.178/forums/showthread.php?t=48464

grimhammer 02-10-2005 07:10 AM

got anything that isn't distro-specific or works with slackware?
With that said, it's something like that that I'm looking for, easy and quick, will do all the tricky parts when I feel I know what I'm doing.
And with that said, I'm off to try it out m'self.

nukenstien 02-10-2005 10:22 AM

i have a very simple firewall script that block most traffic from trying to access you but lets out all traffic, because of the nature of the firewall if you want to use anything like bit torrent then your have to make a hole in the firewall before it will work. It is pretty much the same as using a di-link or linksys router, cause you have to forward traffic for bit torrent through those as well.

nuke

~=gr3p=~ 02-10-2005 09:56 PM

Quote:

Originally posted by grimhammer
[B]got anything that isn't distro-specific or works with slackware?
/B]
uhmm..intsall SQUID package and follow same steps.

Get Squid from here: http://www.squid-cache.org/


All times are GMT -5. The time now is 12:01 AM.