LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-07-2003, 06:07 AM   #1
chris21000
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Rep: Reputation: 0
Help!!! Windows Sharing


I want to connect my Mandrake 9.0 laptop to a windows xp laptop for internet connection sharing... I have no idea how to do it, However I have basic knowlage of setting up windows networks. My latops can ping each other but nothing else.
 
Old 06-07-2003, 06:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you need samba. http://samba.org search this site and google for more information. feel free to ask here if you have a specific problem you are unable to resolve.
 
Old 06-07-2003, 09:10 AM   #3
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
which box connects internet. Xp or Linux ?
if Xp laptop connect internet rigth click on internet connection choose sharing and enable sharing. xp box will get 192.168.0.1 ip. and if u didnt set a static ip for linux. it will get a correct ip. gateway and dns to connect internet
 
Old 06-07-2003, 12:56 PM   #4
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Quote:
Originally posted by acid_kewpie
you need samba. http://samba.org search this site and google for more information.
i think he meant sharing the internet connection, not file shares. samba is
for sharing directories on your linux machine with those on a winows
machine and visa versa (and other stuff like domain controllers and what not).


if they can ping each other then you're almost there. have you setup the XP
box for ICS? (internet connection sharing). what is the IP of the Linux box
and the IP of the NIC it is connected to on the XP box?


another thing to try:

put the dns servers of you isp in the /etc/resolv.conf file on the linux box,
try pinging hostname and ips, if you can ping ip addresses (on the internet) and not hostnames...then you have a DNS problem.

Name: linuxquestions.org << ping that
Address: 64.179.4.146 << then ping that

tell me what happens.

Last edited by Robert0380; 06-07-2003 at 01:00 PM.
 
Old 06-07-2003, 01:57 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
christ, i need to pay attention. well you'll want samba at SOME point no doubt....

personally i normally say, do the sharing through linux, not windows, much better idea. use a firewall builder like firestarter to get both a decent firewall and a shared connection in one go.
 
Old 06-07-2003, 02:32 PM   #6
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Quote:
Originally posted by acid_kewpie
.....well you'll want samba at SOME point no doubt....


yes, this is most true


Quote:

personally i normally say, do the sharing through linux, not windows, much better idea. use a firewall builder like firestarter to get both a decent firewall and a shared connection in one go.
again, i must agree.
 
Old 06-07-2003, 05:08 PM   #7
My_World
LQ Newbie
 
Registered: Apr 2003
Location: South Africa - Kalahari desert
Distribution: Mandrake, Slackware
Posts: 16

Rep: Reputation: 0
Depends on what box is connected to the internet:

If the XP box has the modem, the got to Start-> Controll Panel-> Network Connections (in classic view).
Find your internet connection, right click on it, select "Properties" and then under the "Advanced" tab select "Allow other network users to connect through this computer's internet connection" and "Ok".
Now if you go to your network connection, and check the IP (Right click-> Properties-> (Internet Protocol)TCP/IP) you'll see it is set to 192.168.0.1 Subnet: 255.255.255.0
Now the sharing bit is done.

Go to the linux box and change the Linux box IP to: 192.168.0.2 Subnet: 255.255.255.0 and (verry important) Gateway: 192.168.0.1 (the IP of the XP box).

Open a console, su to root, the do the following:
1. modprobe networkcard (eg: modprobe 3c509)
2. ifconfig eth0 192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0
(always note that which ever computer has the modem gets the 192.168.0.1 ip)
3. route add -net default gw 192.168.0.1 netmask 0.0.0.0 metric 1
(this replaces the iptables)
Put this in ur /etc/rc.d/rc.local so it loads at boot, and your network is complete so you can now have great internet sharing with your linux computer.


Do the same in reverse if your linux box has the modem like:
Linux first, su into root, and then;
1. modprobe networkcard (eg: modprobe 3c509)

2. ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK
(example for mine: ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0)

3. iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -j MASQUERADE
(have iptables installed, and use that exact line, you don't have to change anything on it)
(HINT: put the modprobe, the ifconfig and the iptables in one of ur rcscripts so it loads at boot), if u have /etc/rc.d/rc.local put them in there like this...

#----------------------------------------------------------------------------------
modprobe 3c509
ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -j MASQUERADE
#----------------------------------------------------------------------------------

Now to the Xp box and only change it's IP to 192.168.0.2 SubnetMask 255.255.255.0 and (verry important) Default Gateway: 192.168.0.1 and also Prefered DNS server: 192.168.0.1

That last bit may seem strange, but it makes one's live really easier, just try it!

Last edited by My_World; 06-07-2003 at 05:15 PM.
 
Old 06-07-2003, 08:26 PM   #8
funtoos
Member
 
Registered: Jun 2003
Location: US
Distribution: Gentoo x86/AMD64, KDE 4.13
Posts: 38

Rep: Reputation: 25
my_world makes a very good suggestion. although, I would leave static numbers like 192.168.0.2 out and let DHCP take over. XP can serve as DHCP server when ICS is enabled.
 
Old 06-07-2003, 09:05 PM   #9
chris21000
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Original Poster
Rep: Reputation: 0
noooooooooooooooooooooooooo

I know that this is a really studpid question but on Mandrake 9.0 how do u change ip's?
 
Old 06-07-2003, 09:11 PM   #10
chris21000
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou Thankyou
I can't thankyou enough!

p.s Is there an msn messenger for linux
 
Old 06-08-2003, 05:17 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://gaim.sf.net
 
Old 06-08-2003, 07:09 AM   #12
My_World
LQ Newbie
 
Registered: Apr 2003
Location: South Africa - Kalahari desert
Distribution: Mandrake, Slackware
Posts: 16

Rep: Reputation: 0
The only reason why I use static IP's is cause ofer here (South Africa), we have no free connection to the internet. It cost's us $1 to connect for an hour ont the net in cheap time (7pm - 7am) and that's without our ISP charges.
For this reason we don't realy have afordable 24/7 connections, and thus my server get's shut down every moning just before 7am, and Windows networking doesn't like that!!!

It wrecks havoc on the network cause the DHCP server is suddenly gone, and even after restarting the server you need to reboot the other Windows machines to get the network going again.
Anyway, that's why I (needless to say) prefer static IP's.
 
Old 06-08-2003, 02:18 PM   #13
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
a note on those Windows machines:

you shouldnt have to reboot to restart the network on em:

win 2000/XP, go to Control Panel-> Network Connections
and find the Local Area Connection icon, RIGHt mouse click on it
and DISABLE, the wait like 2 or 3 seconds, then RIGHT CLICK again
and click ENABLE...it sends out a DHCP request, if the server is there
then it will get an IP address.....you dont have to reboot.


win 98/me -->> Click Start-> Run
type winipcfg in the box and hit enter


when the IP Configuration box appears, select your adapter ( Ethernet
adapter) in the pulldown menu.

At the bottom, click Release All, then wait a second or 2 (maybe you
dont have to wait at all) then click Renew All

and it will also find the DHCP server and get an address...no reboot required.

this is what i do a lot of where i work (school....residential networking)
we just call it "Disable/Enable" or "Release/Renew" now because
we do it so much.
 
Old 06-09-2003, 11:23 AM   #14
caro
LQ Newbie
 
Registered: Jun 2003
Location: Louisville Kentucky
Distribution: Redhat 9
Posts: 6

Rep: Reputation: 0
I have the same problem...can't get the XP machine online, but have no problem getting the Linux machine online. I'm actually running RedHat 9 and it tells me the ifconfig command is not found!!!!

Can anyone help me with this???? Where is ifconfig??
 
Old 06-09-2003, 02:54 PM   #15
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Linux:
/sbin/ifconfig

WIndows XP:
c:\windows\system32\ipconfig

c:\windows could be c:\winnt on some systems. (i even set mine to c:\winxp once..but i have long since given up on XP on my computer...it wont run right)

Last edited by Robert0380; 06-09-2003 at 02:56 PM.
 
  


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
Sharing from Fedora to Windows rvgriff Linux - Networking 5 10-17-2005 06:37 PM
windows sharing bgrudy Linux - Networking 4 06-08-2004 10:45 PM
sharing to a Windows PC wslyhbb Linux - Networking 2 12-25-2003 08:37 AM
Sharing with Windows kdmiller45 Linux - Networking 2 08-27-2003 10:19 AM
Sharing w/windows Iknowit101 Linux - Networking 2 07-16-2001 04:05 PM

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

All times are GMT -5. The time now is 10:45 AM.

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