LinuxQuestions.org
Visit Jeremy's Blog.
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 04-24-2004, 11:44 AM   #1
Mr Marmmalade
Member
 
Registered: Oct 2002
Location: Scotland
Distribution: Debian
Posts: 214

Rep: Reputation: 27
ICS linux host with w98se clients.


ICS linux host with w98se clients.

i can find info on ICS for a linux client, but can't seem to find any decent info/tutorials for the other way round. can anyone please point me in the right direction.

im running slack9.1, which can get onto the net fine, and i made sure to install IP packet forwarding when installing it (since it sounded useful). im on dial-up.

i'll try and do the samba stuff afterwards, im just really wanting to get ICS going as otherwise i've got to go back to windows to let other pc's through me onto the net.

thanks.
 
Old 04-24-2004, 12:39 PM   #2
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
The following is adapted from my post here.

I assume that you've set up your network correctly so that you can successfully ping between your Slackware and Win98 boxes.

Also, I assume that you have only a handful of computers on your LAN, so you are not using DHCP.

I haven't used Windows in some time, so I will try to work from memory. On the Win98 box, you need to tell it to use the Slackware box as the internet gateway. Under Windows networking setup, add the gateway 192.168.xx.xx (192.168.xx.xx is the internal ip address for the Slackware box). Further, under domain name resolvers, add the ip addresses for your ISP DNS servers.

On your Slackware box, you need to edit the /etc/resolv.conf to include the ip addresses for your ISP's DNS servers; the entry in your /etc/resolv.conf is "nameserver 12.23.45.67" where 12.23.45.67 is your ISP's DNS server address.

On the Slackware box, you need to configure iptables to allow IP masquerading and network address translation (NAT) to "share the internet". Assuming that on the Slackware box, the modem interface is "ppp0" and the ethernet interface is "eth0", then copy and paste the following code into /etc/rc.d/rc.firewall:

Code:
# !/bin/sh
IPTABLES='/usr/sbin/iptables'

# load iptables modules
/sbin/modprobe iptable_nat
/sbin/modprobe ip_conntrack

# enable ip forwarding
/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

# flush tables
$IPTABLES -F
$IPTABLES -X

# enable masquerading to allow LAN internet access
$IPTABLES -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

# forward internal LAN traffic from eth0 to ppp0 internet interface
$IPTABLES -A FORWARD -i eth0 -o ppp0 -m state --state NEW,ESTABLISHED -j ACCEPT

# block out internet intrusion on ppp0
$IPTABLES -A INPUT -i ppp0 -m state --state NEW,INVALID -j DROP
$IPTABLES -A FORWARD -i ppp0 -m state --state NEW,INVALID -j DROP
As root, run /etc/rc.d/rc.firewall. On Slackware, /etc/rc.d/rc.firewall is executable by default, but if for some reason it isn't, then chmod +x /etc/rc.d/rc.firewall.

You should now be able to browse the internet from the Win98 box. As a nice bonus, your Slackware box is also a firewall.

DISCLAIMER: I don't use dialup, so I am merely guessing that your modem interface is ppp0. On my rc.firewall script, my internet interface is eth0 (ethernet connected to cable modem) and my internal lan interface is eth1.

Last edited by spurious; 04-25-2004 at 12:40 PM.
 
Old 04-24-2004, 01:34 PM   #3
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
ICS is NAT. Microsoft just decided they needed another acronym to confuse everyone.
 
Old 04-24-2004, 01:36 PM   #4
Mr Marmmalade
Member
 
Registered: Oct 2002
Location: Scotland
Distribution: Debian
Posts: 214

Original Poster
Rep: Reputation: 27
thanks, i will give it a go.

oh, i do use ICS for the win machines... but i may change that to statics.
 
Old 04-24-2004, 01:53 PM   #5
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
ICS starts up a (non-configurable) mini-DHCP server that fills in all the TCP/IP info for you. That's the only reason people think it's different/easier. Of course, if you have multiple network cards or want to specify your own address range, you'll find out how inflexible MS' idiot proofing really is. The basic function ICS provides is NAT, however.
 
Old 04-24-2004, 04:28 PM   #6
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Since your clients are Win98 machines, you're gonna likely come across an MTU issue with them sooner than later if you're on dialup or using PPPoE. You may wanna download DrTCP from www.broadbandreports.com (unless you know the registry like the back of your hand) to set the values. DO nothing unless you have to, but if you can't surf to certain sites (especially https) lower your MTU to 1492 for PPPoE (many ADSL) or something lower than 576 for dialup (I had best ping times and no packet loss at about 480 when I did it).

I had this problem running ICS but not with Linux NAT. If you do, save yourself a really long and difficult search and follow my pointer. I hope that its not necessary.

Last edited by vectordrake; 04-24-2004 at 04:29 PM.
 
Old 04-24-2004, 04:38 PM   #7
Mr Marmmalade
Member
 
Registered: Oct 2002
Location: Scotland
Distribution: Debian
Posts: 214

Original Poster
Rep: Reputation: 27
i'm going to try this:

http://www.tldp.org/HOWTO/IP-Masquer...WTO/index.html



i'll first set up a gineau-pig win98 system just in case i nuke something on my dads pc.
 
Old 04-25-2004, 10:23 PM   #8
Jesterace
LQ Newbie
 
Registered: Aug 2003
Location: Nova Scotia, Canada
Distribution: Ubuntu
Posts: 26

Rep: Reputation: 15
Slackware 9.0

Could you post your configuration script? My eth0 is my internet connection and eth1 is my homenetwork. My roommates client machine is a win98 box but I can figure out how to set that up myself. But it would be handy to see the code with eth0 and eth1 instead of the dialup connection
 
  


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
Windows XP as ICS host & Linux as client connection problem ! hemanfan Linux - Networking 3 06-08-2005 04:29 PM
running slackware as a client through a WinXP ICS host. FLOODS Linux - Networking 119 08-17-2004 05:11 PM
MDK 10 host unable to ping W98SE client Manasseh Linux - Networking 2 05-16-2004 12:22 AM
ICS sharing with win xp as host simao20 Linux - Networking 6 04-03-2004 05:16 PM
Win2K ICS host and Linux client raypen Linux - Networking 3 03-18-2003 12:58 PM

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

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