LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-02-2005, 02:06 PM   #1
ColdDeath
LQ Newbie
 
Registered: Oct 2005
Distribution: Slackware 10.2
Posts: 3

Rep: Reputation: 0
Angry Sharing internet access with my Windows box


Hey everyone,
I've got a problem that i need some help on.

I have a Slackware box that uses a USB modem (device: ppp0) and i have a Windows box. They are connected by a crossover cable.
I need to allow the Windows box to use the internet. With some help i have written this script:

Quote:
Originally Posted by /etc/rc.d/rc.firewall
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
/usr/sbin/iptables --flush
/usr/sbin/iptables -t nat -P POSTROUTING DROP
/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
/usr/sbin/iptables -A FORWARD -i eth0 -o ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT
When i run this script, my Slackware box can conenct to the internet and ping the Windows box. The windows box can ping the Slackware box, and ping Ip addresses. It can also open an ip address of a website in the browser. But the windows box won't open domain names ina browser or ping them.

For example:
google .com 's IP is 216.239.37.99
If i ping that IP address form my Windows box, i get a reply, but if i ping the URL i don't. Also if i put the IP address in a browser i can se google.com, but if i put the URL in, i can't.

I don't know what to do next, can anyoen suggest what to do?

--ColdDeath

Last edited by ColdDeath; 11-02-2005 at 02:10 PM.
 
Old 11-02-2005, 02:16 PM   #2
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
When you can ping or open an IP address but not the URL, it's a DNS problem. Since the windows box isn't initiating the connection it's not receiving the DNS server addresses from the ISP. You'll have to set them statically. You can get the addresses by viewing the /etc/resolv.conf file on the Slackware box. Then open the network connection -> TCP/IP -> Properties on the windows box and enter those addresses as static.
 
Old 11-02-2005, 02:17 PM   #3
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Rep: Reputation: Disabled
hehe
http://www.linuxquestions.org/questi...hreadid=379292
just trying the same thing, gonna try the script you provided in a min.
My idea to solve your prob:
Have you set your DNS-Server entry on your win box set to the ip of your slack box?
I don't know for sure, just a thought
 
Old 11-02-2005, 02:26 PM   #4
ColdDeath
LQ Newbie
 
Registered: Oct 2005
Distribution: Slackware 10.2
Posts: 3

Original Poster
Rep: Reputation: 0
Someoen told me to set the DNS server for the windows boxes to be the same as /etc/resolv.conf and they are matching. But it doesn't work.

EDIT: also I am using DSL if that makes a difference.

Last edited by ColdDeath; 11-02-2005 at 02:30 PM.
 
Old 11-02-2005, 02:35 PM   #5
c31c
Member
 
Registered: Mar 2004
Location: Planet Earth
Distribution: Arch Linux
Posts: 106

Rep: Reputation: Disabled
i just wrote a msg in my post. I just changed the dns server(s) to the ones in /etc/resolv.conf and used your script and it works
thank you and good luck!
 
Old 11-02-2005, 03:08 PM   #6
ColdDeath
LQ Newbie
 
Registered: Oct 2005
Distribution: Slackware 10.2
Posts: 3

Original Poster
Rep: Reputation: 0
I'm glad i helped you.


I opened the properties for my connection, and checked it and it was typed properly. So i deleted boths the DNS IP addresses, then saved the settings, then i opened it again, and typed it back in and saved the settings. And it worked!

Thanks to everyone who tried to help.
 
  


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
Inetrnet connection sharing between a Slackware box and windows box planetsheinker Slackware 10 09-23-2006 11:53 PM
Why my Internet Sharing with Xp box not working? qutub110 Linux - Networking 4 04-19-2005 12:35 PM
Linux Box with 3 NICs for Internet sharing digihall7 Linux - Networking 3 04-30-2004 03:30 AM
Sharing Internet with a WinXP Box sovietpower Linux - Networking 2 11-13-2003 08:19 PM
internet access through nat software on windows box eula2u2 Linux - Networking 1 02-08-2002 11:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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