LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-30-2006, 11:56 AM   #16
Tje
Member
 
Registered: Dec 2005
Posts: 75

Rep: Reputation: 15

Quote:
Originally Posted by manishsingh4u
Alright, I need some information from ur side first
1) Which type of internet connection do u have? eg. dialup modem, broadband modem, etc.

2) Which will be the server and which will be client for the internet connection sharing?

3) Are you using static ip address or u have a dhcp to allocate ip addresses. Give exmaple if possible.
ok..I will give the information as much as I can..

1) The type of internet is broadband modem
2) I have ever tried connect my Linux wirelessly to the internet connection shared from Windows. The Windows got the internet connection from LAN, then make the wireless ip address static, after that I changed my Linux wireless ip address to the same ip address range with that Windows, then just connect with no problem.

so..

Maybe I would like to know if the server is the Linux one, and the client for the internet connection sharing is the Windows one.

3) For this question, I just make it the other way of the answer of question 2 above. I will give you the case.

So, The Linux box has already connected to the Internet via LAN, wired connection, broadband modem internet connection. I want to share my Linux internet connection wirelessly to my friend's laptop. My Linux wireless ip address should make it static something like 192.168.0.1/255.255.255.0 and for the windows should be like 192.168.0.2/255.255.255.0.

The usual case for me is, the router only got one ethernet cable output and one usb cable output.
So that is why I want to know how to achieve this because I dunno how to create a new connection or SSID so that Windows can detect my wireless and connect into it.



Thannks
 
Old 05-30-2006, 12:26 PM   #17
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Well, we don't need to do a lot of work here as u don't have any issues with the drivers or settings. What we need here is a little modification.

a) Suppose ur NIC which is connected directory to the internet is eth0 (although, in ur case it may be anything eg. eth1, eth2, etc). And it gets it's ip address from your internet service provider's dhcp server (non static).
b) And supoose ur wireless NIC is eth1 (static with ipaddress/subnet as 192.168.0.1/255.255.255.0)

Step 1) Then your /etc/network/interfaces should look like this
Code:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
mapping hotplug
        script grep
        map eth0
iface eth0 inet dhcp
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
auto eth0
auto eth1
Step 2) And your /etc/resolv.conf should have your dns entries
Code:
search yourinternetproviderdomain.com
nameserver X.X.X.x
nameserver x.x.x.x
Replace yourinternetproviderdomain.com with your isp's domain and "x.x.x.x" with your isp's dns ipaddresses.

Step 3) Restart your network (as root)
Code:
/etc/init.d/network restart
Step 4) Run these commands on Linux (as root)
NOTE - These rules will be lost after rebooting.
Code:
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Step 5) Now, your windows XP machine must have configuration similar to this
Code:
ipaddress = 192.168.0.2
subnet mask = 255.255.255.0
default gateway = 192.168.0.1 (hint - linux wireless eth1)
primary dns = your first dns (hint -used in /etc/resolv.conf on linux machine)
secondary dns = your second dns
After u have finished all these steps with no errors, your internet connection sharing must work. Please let me know if it works.

Last edited by manishsingh4u; 05-31-2006 at 07:50 AM.
 
Old 05-30-2006, 07:38 PM   #18
Tje
Member
 
Registered: Dec 2005
Posts: 75

Rep: Reputation: 15
Quote:
Originally Posted by manishsingh4u
Well, we don't need to do a lot of work here as u don't have any issues with the drivers or settings. What we need here is a little modification.

a) Suppose ur NIC which is connected directory to the internet is eth0 (although, in ur case it may be anything eg. eth1, eth2, etc). And it gets it's ip address from your internet service provider's dhcp server (non static).
b) And supoose ur wireless NIC is eth1 (static with ipaddress/subnet as 192.168.0.1/255.255.255.0)

Step 1) Then your /etc/network/interfaces should look like this
Code:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
mapping hotplug
        script grep
        map eth0
iface eth0 inet dhcp
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
auto eth0
auto eth1
Step 2) And your /etc/resolv.conf should have your dns entries
Code:
search yourinternetproviderdomain.com
nameserver X.X.X.x
nameserver x.x.x.x
Replace yourinternetproviderdomain.com with your isp's domain and "x.x.x.x" with your isp's dns ipaddresses.

Step 3) Restart your network
Code:
sudo /etc/init.d/networking restart
Step 4) Run these commands on Linux (as root) or prefix "sudo " to these commands (NOTE - These rules will be lost after rebooting).
Code:
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Step 5) Now, your windows XP machine must have configuration similar to this
Code:
ipaddress = 192.168.0.2
subnet mask = 255.255.255.0
default gateway = 192.168.0.1 (hint - linux wireless eth1)
primary dns = your first dns (hint -used in /etc/resolv.conf on linux machine)
secondary dns = your second dns
After u have finished all these steps with no errors, your internet connection sharing must work. Please let me know if it works.
your supposed is exactly the same what I want to know..

WOW...this is great..I save all of these what you said...
I think...the main thing to share the internet is..in the step 4...using iptables..I never think about this..I have learned iptables a bit before..but to share the internet never think into iptables...

because the bad thing is, I compare to windows...in the control panel -> network connections, there you can easily click the feature in the checkbox to share the internet, something says "allow other computer to connect to this computer's internet"

so in linux, using iptables...

I havent analyze the iptables command..
but want to ask about step 5..
in windows, there is two ip address text boxes to set DNS server address...
-one is Preferred DNS Server
-the other one is Alternate DNS Server

I usually put in Preferred DNS Server the same as Default Gateway ip address..
So, which ever ip address from the gateway, suppose 192.168.0.1, then I put 192.168.0.1 too in Preferred DNS server..maybe my concept is wrong..
my question is in this line
Quote:
primary dns = your first dns (hint -used in /etc/resolv.conf on linux machine)
Then, in my guess, the primary dns in step 5, should be the static one found in /etc/resolv.conf on linux machine..


Thanks a lot....



P.S. : I saved your instructions...I will try later on..because...I just changed my distro from mandriva 2006 to Suse 10.1 and my wireless still doesnt work, it does detect the access point correctly and that is good, and I guess, it can not connect to the access point which has WEP encryption.. it said in dmesg command :

Code:
ieee80211_crypt_wep: module not supported by Novell, setting U taint flag.
ieee80211_crypt: reieee80211_crypt_wep: module not supported by Novell, setting U taint flag
I was still struggling in about more than a week to connect my access point from Suse 10.1...
but now, because there is so many complaints in the thread "BIG WTG?? to Suse 10.1 developers"...
I want to try 10.0 ...so I will re install and try the wireless again..

Thanks again, I am sure that I will try your instructions..after my Suse wireless gotta work first..
 
Old 05-31-2006, 01:05 AM   #19
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by Tje
I think...the main thing to share the internet is..in the step 4...using iptables
Yes, you r right.
Quote:
Originally Posted by Tje
Then, in my guess, the primary dns in step 5, should be the static one found in /etc/resolv.conf on linux machine.
Exactly, you r right again.
The dafault gateway, prefered dns and alternate dns can be same or different depending upon your internet service provider's configurations.
Quote:
Originally Posted by Tje
I will try later on
Well, I don't have any experience with wireless NICs and access points. So, here I might have to let u do this on ur own. But, yes after u get it to work, we can carry on with the internet connection sharing problem (in case, if these settings doesn't work).

Last edited by manishsingh4u; 05-31-2006 at 01:09 AM.
 
Old 05-31-2006, 03:30 AM   #20
Tje
Member
 
Registered: Dec 2005
Posts: 75

Rep: Reputation: 15
ok then..
many thanks for all your time, advices and instructions..
I will ask again if I got problem in my internet connection sharing with the settings that you gave..
 
Old 05-31-2006, 07:41 AM   #21
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Update: Hi, I am sorry about my post regarding the internet connection sharing. The "sudo" command is not available in SuSE. Somehow, due to some more of my similar posts, i posted the setting for Ubuntu by mistake.
But now, I have made changes in that post. Please check it again before implementing it. I am really sorry for any inconveniences if anyone has followed it.

Hello Tje, please update my quoted message in ur post too as it has the text from my previous post. thanks.

Last edited by manishsingh4u; 05-31-2006 at 07:47 AM.
 
Old 05-31-2006, 10:55 PM   #22
Tje
Member
 
Registered: Dec 2005
Posts: 75

Rep: Reputation: 15
dont worry about that..I can just login as root..
 
  


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
Cannot Configure Ethernet Adapter With SUSE Linux databox Linux - Hardware 7 05-18-2006 01:03 AM
DVD recorder won't configure in Suse linux 10 bthacker Linux - Software 1 04-18-2006 05:23 PM
Please .....How to configure ??DSL 502T with Suse linux gigglie SUSE / openSUSE 1 03-09-2006 06:38 AM
Configure Linksys HPN200 w/SUSE LINUX oldkemist Linux - Hardware 1 03-19-2005 10:59 PM
HP NX5000 with Suse linux 9.1: not able to configure and run wireless mireia Linux - Laptop and Netbook 1 01-14-2005 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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