LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   sharing internet with windows xp (https://www.linuxquestions.org/questions/fedora-35/sharing-internet-with-windows-xp-435496/)

dip_10 04-15-2006 04:55 PM

sharing internet with windows xp
 
i have a dual boot pc with winxp and fedora core 5 installed.i can share my broadband connection(bsnl-dataone)with my friend on winxp.
my winxp server
ip: 192.168.0.1(eth0)
subnet:255.255.255.0
eth1:192.168.1.3(connects to broadband via dhcp)
subnet:255.255.255.0
my friend's winxp system
ip:192.168.0.2
subnet:255.255.255.0
gateway:192.168.0.1(my ip)
i want to share internet connection on fedoracore.i set my fedora ip:192.168.0.3(eth0)
subnet:255.255.255.0
eth1:192.168.1.2(connects to broadband via dhcp)
subnet:255.255.255.0
with this i can ping my friend's system and share his shared files on smb.i can also use internet.
i tried:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -P FORWARD DROP
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
iptables -A FORWARD -m state --state STABLISHED,RELATED -j ACCEPT
and change my friend's gateway to:192.168.0.3
but can not share internet connection.
please help.

b0nd 04-16-2006 01:42 PM

hi,
Its doing the right thing by changing the gateway to 192.168.1.3 in your friends machine, b'coz its the IP of you machine.

Instead of assigning different IP's in windows and linux it would have been better to use the same on both o/s. But assigning the current IP's you are just confusing the things.

post the o/p of following commands executing on your friends machine:
#route -n
#cat /etc/resolv.conf

regards

dip_10 04-28-2006 05:46 AM

success at last.....
i assigned the same ip on both o/s.what did extra was:i added the dns srver ip's on my machine to my friend's machine.in windows the dns server working for him was my machine.this was fine with windows.but in linux it didn't worked as my machine is not configured as a dns server.so i added some dns server to the client computer.
this way i can serve my friend on both o/s.

this scheme has a drawback:it uses maximum bandwidth for resolution of names requested by my friend's machine.so on server i get very low bandwidth and annoying browing experience.can anyone help me suggesting a better scheme?

regards.

b0nd 04-28-2006 01:36 PM

Quote:

i added the dns srver ip's on my machine to my friend's machine
.
u did the right thing.

Quote:

in windows the dns server working for him was my machine.this was fine with windows.but in linux it didn't worked as my machine is not configured as a dns server.
Is your machine working as DNS on windows ???
If not then better change the DNS IP to the DNS provided by ISP instead of your machines IP. His machine just need your machine as gateway.


Quote:

so i added some dns server to the client computer.
this way i can serve my friend on both o/s
.
thats why the output of #cat /etc/resolv.conf was asked.

Quote:

this scheme has a drawback:it uses maximum bandwidth for resolution of names requested by my friend's machine.so on server i get very low bandwidth and annoying browing experience.can anyone help me suggesting a better scheme?
there is nothing wrong in the scheme. Problem may be with the DNS IP address. Ask your ISP about the DNS IP's and put them there.

regards

dip_10 04-29-2006 02:01 PM

i don't know what happened in windows xp,but i didn't have to add any dns server on my client's machine.i used and shared internet with my client's machine for at least one month without any problem.but the setup didn't worked in linux.so i added that extra and get it working.
my linux box comes with two dns server addresses.i added those addresses to my client's computer.do you think changing these addresses to those provided by my isp would help?
thanks for the valuable suggestions.

regards.

b0nd 04-30-2006 12:16 AM

Quote:

Originally Posted by dip_10
my linux box comes with two dns server addresses.i added those addresses to my client's computer.do you think changing these addresses to those provided by my isp would help?
thanks for the valuable suggestions.
regards.

U did the right thing by putting that DNS in the client machine.
reverse the DNS entries in /etc/resolv.conf. may be the first one not working properly so the name resolution is taking time (it happened to me once).

regards


All times are GMT -5. The time now is 07:00 AM.