network problem: internet sharing

David A. Bandel david
Mon May 17 11:49:37 PDT 2004


On Mon, 21 Jul 2003 10:28:59 -0400
Keith Antoine <kantoine at optusnet.com.au> wrote:

> I seem to have given may an incorrect version of my internet sharing
> problem. The problem is NOT that I cannot share my machine with
> daughters downstairs machine, but that I cannot share theinternet
> connection. This does not entail any file sharing on either machine
> and is normally done both in XP and in Mandrake 9.x via aGUI
> interface. This has always worked in the past on may other machines
> that i have installed. However not this monster.
> 
> OUTPUT of ifconfig:
> eth0      Link encap:Ethernet  HWaddr 00:E0:18:F1:BE:AE
>           inet addr:192.168.1.1  Bcast:192.168.1.255 
>           Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST  MTU:1500 
>           Metric:1 RX packets:11 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100
>           RX bytes:2725 (2.6 Kb)  TX bytes:2546 (2.4 Kb)
>           Interrupt:11 Base address:0xb000
> 
> eth1      Link encap:Ethernet  HWaddr 00:E0:18:FE:6E:70
>           inet addr:210.49.48.75  Bcast:210.49.48.255 
>           Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST  MTU:1500 
>           Metric:1 RX packets:715 errors:0 dropped:0 overruns:0
>           frame:0 TX packets:42 errors:0 dropped:0 overruns:0
>           carrier:0 collisions:0 txqueuelen:100
>           RX bytes:54804 (53.5 Kb)  TX bytes:3624 (3.5 Kb)
>           Interrupt:5 Base address:0x2000
> 
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:56 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:3800 (3.7 Kb)  TX bytes:3800 (3.7 Kb)
> 
> OUTPUT of route:
> [root at dhcp-817-6 kantoine]# route
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref   
> Use Iface 192.168.1.0     *               255.255.255.0   U     0     
> 0        0 eth0 210.49.48.0     *               255.255.255.0   U    
> 0      0        0 eth1 127.0.0.0       *               255.0.0.0      
> U     0      0        0 lo default         210.49.48.1.opt 0.0.0.0    
>     UG    0      0        0 eth1
> 
> OUTPUT of ping to downstairs machine:
> [root at dhcp-817-6 kantoine]# ping 192.168.1.2
> PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
> 64 bytes from 192.168.1.2: icmp_seq=1 ttl=128 time=0.246 ms
> 64 bytes from 192.168.1.2: icmp_seq=2 ttl=128 time=0.228 ms
> 64 bytes from 192.168.1.2: icmp_seq=3 ttl=128 time=0.219 ms
> 64 bytes from 192.168.1.2: icmp_seq=4 ttl=128 time=0.222 ms
> 
> 
> Now if I go downstairs I cannot ping to this machine 192.168.1.1
> nor can I 'see' the net with a browser. This is irrespective of the OS
> on this upstairs machine. So there is something wrong on the
> downstairs machine or the connection to this machine !! Logic dictates
> that. No the nic leads are fine as I would not be able to ping
> downstairs and the cards would have X on them.
> 
> Question what moves do you suggest that I make now, given the above.
> 

Ensure the Windoze box has the correct IP and matching subnet mask. 
Also that it lists your upstairs box as the gateway.  I'd also check the
DNS addresses.

Then run:
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth1 -j SNAT
--to-source 210.49.48.75
iptables -N tcprules
iptables -A tcprules -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A tcprules -p icmp --icmp-type echo-request -j ACCEPT
iptables -A tcprules -m state --state NEW -i ! eth1 -j ACCEPT
iptables -A tcprules -m state --state INVALID -j DROP
iptables -A FORWARD -j tcprules
iptables -A INPUT -j tcprules
sysclt net.ipv4.ip_forward=1

and try again.

Ciao,

David A. Bandel
-- 
Focus on the dream, not the competition.
		Nemesis Racing Team motto
GPG key autoresponder:  mailto:david_key at pananix.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.linux-sxs.org/pipermail/linux-users/attachments/20030720/eeefb1d3/attachment.pgp


More information about the Linux-users mailing list