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..