LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-10-2006, 09:11 AM   #1
parthbakshi
LQ Newbie
 
Registered: Feb 2005
Location: India
Distribution: Suse linux 10.0
Posts: 28

Rep: Reputation: 15
sharing internet connection in linux


hi
i want to share my internet connection in linux with windows computers ,how shd i do that ,im using suse linux 10.0
 
Old 03-10-2006, 09:29 AM   #2
mac1234mac
Member
 
Registered: Sep 2005
Posts: 183

Rep: Reputation: 30
reply

First of all in what stage are you?.
Do you have net adapters and connection between computers?.
(is, for example, Samba working?)
 
Old 03-10-2006, 10:23 AM   #3
parthbakshi
LQ Newbie
 
Registered: Feb 2005
Location: India
Distribution: Suse linux 10.0
Posts: 28

Original Poster
Rep: Reputation: 15
hi
actually we got an internet connection connected to windows xp which is shared ,which i can access in linux,due to some reason i have to shift the internet connection to my pc and i want it to share it with others who r in windows while im in linux,now we got provider which has give me a program in linux thru which i can login to my broadband connection.The connection is given to us is thru ethernet card so any machine which shares internet connection has two ethernet card,one for internet conection other for internal lan.now how do share this in linux .
thanking in advance for u r help
 
Old 03-10-2006, 11:03 AM   #4
mac1234mac
Member
 
Registered: Sep 2005
Posts: 183

Rep: Reputation: 30
reply2

OK, but can you ping both ways?. From computer which has internet
connection (if I understand correctly - Linux) to the other computer
(Win) and the other way around?. Internet is working on Linux,
is that true?.
 
Old 03-10-2006, 11:33 AM   #5
parthbakshi
LQ Newbie
 
Registered: Feb 2005
Location: India
Distribution: Suse linux 10.0
Posts: 28

Original Poster
Rep: Reputation: 15
no basically i want to know the procedure how u share the internet connection in linux ,anyways on internal lan i can ping both ways.
 
Old 03-10-2006, 12:32 PM   #6
mac1234mac
Member
 
Registered: Sep 2005
Posts: 183

Rep: Reputation: 30
You may have problem with firewall.
Try this (but first you must check what interface your card is
using for example 'eth0'):

enter:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

and

echo 1 > /proc/sys/net/ipv4/ip_forward

as root in your shell in Linux.

Then open some website on Windows computer.

Last edited by mac1234mac; 03-10-2006 at 12:36 PM.
 
Old 03-10-2006, 02:51 PM   #7
scottmorris
Novell CoolSolutions Editor
 
Registered: Jan 2006
Distribution: SUSE 9.3 - 10.0
Posts: 30

Rep: Reputation: 16
Internet connection sharing.

I have written an article about this very thing. If you follow it, you will be able to share your Internet connection in SUSE 10.0. The article is located on Novell's CoolSolutions website.
 
1 members found this post helpful.
Old 02-16-2011, 10:40 AM   #8
untitle
LQ Newbie
 
Registered: Mar 2010
Posts: 14

Rep: Reputation: 0
HI, i got a similar problem, and i cant success.
In my main pc i got wifi conection from some open AP, now i wont to share this internet conection with laptop, i trying a lot of methods but didnt success, i try this but nothing... i ping each other pc and work eth0 conection, but still cant share wlan0.
Both my computers ar runing at ubuntu, one is at 10.04 second is on 10.10.



P.S. i try it from windows xp i start with my main pc in wix xp i share it without problem to ubuntu 10.04 (laptop).

Plz help.

Last edited by untitle; 02-16-2011 at 10:44 AM.
 
Old 02-16-2011, 06:19 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Does the wireless connection work? Supply networking config info for both hosts. Describe what you have done on both machines. Provide the ifconfig command output, and the contents of the ifcfg_wlan0 and ifcfg_eth0.

If the second computer has wireless, then connect the same way, directly to the same AP.

If the second computer doesn't, describe the connection between the two computers, Switch or crossover cable. One option is to enable masquerading on the first computer, where the first computer is a DHCP/NAT server for the second.

Another option is to subnet your local network, and enable port forwarding. The AP in this case supplies the NAT translation. I have done this at one time, to provide my desktop Internet access. I used 192.168.1.100/255.255.255.128 on my laptop wireless, 192.168.1.130/255.255.255.128 on eth0;
192.168.1.131/255.255.255.128 on my desktop. The one snag I ran into was that I needed to load the conntrack kernel module before port forwarding worked.

Last edited by jschiwal; 02-17-2011 at 06:57 AM.
 
Old 02-18-2011, 06:52 AM   #10
untitle
LQ Newbie
 
Registered: Mar 2010
Posts: 14

Rep: Reputation: 0
Yes wifi conection work well,

this is the output from main pc of ifconfig

Quote:
eth0 Link encap:Ethernet HWaddr 00:22:15:d2:ac:4e
inet addr:10.42.43.1 Bcast:10.42.43.255 Mask:255.255.255.0
inet6 addr: fe80::222:15ff:fed2:ac4e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5667 (5.6 KB) TX bytes:5677 (5.6 KB)
Interrupt:44 Base address:0xe000

wlan0 Link encap:Ethernet HWaddr 00:0e:2e:8d:0e:c4
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20e:2eff:fe8d:ec4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:80652 errors:0 dropped:0 overruns:0 frame:0
TX packets:76907 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:48819542 (48.8 MB) TX bytes:10357888 (10.3 MB)
this is the output from my laptop pc
Quote:
eth0 Link encap:Ethernet HWaddr 00:1f:16:23:42:49
inet addr:10.42.43.2 Bcast:10.42.43.255 Mask:255.255.255.0
inet6 addr: fe80::21f:16ff:fe23:4249/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2296 (2.2 KB) TX bytes:5577 (5.5 KB)
Interrupt:29 Base address:0xe000
both pc i was ping and working i made static ip adress
 
Old 02-19-2011, 06:33 AM   #11
untitle
LQ Newbie
 
Registered: Mar 2010
Posts: 14

Rep: Reputation: 0
i solved my problem, i just need to set up at another pc dinamic ip adress. Everything works well.
 
  


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 internet connection in linux parthbakshi Linux - Software 6 03-10-2006 07:35 PM
Internet Connection Sharing through Linux 9 unmesh vaidya Linux - Newbie 1 11-25-2003 07:32 AM
Internet Connection Sharing LINUX Please HELP MistroTHX Linux - Networking 2 10-06-2003 03:50 PM
Sharing Internet connection via Linux 8.0 troyzeng Linux - Networking 1 09-20-2003 02:41 PM
Internet connection sharing between XP and linux kidicarus Linux - Networking 16 09-16-2003 07:05 PM

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

All times are GMT -5. The time now is 01:42 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