# Problem getting my Win2k box to connect to my Gentoo Box.

## axxessdenied

Ok. I can connect to the internet fine with my linux box... as you can tell =]

When I try to get my win2k pc to connect to my linux box via a crossover cat5, neither computer's see each other.

eth0 has the crossover cat5 connected to it.

eth1 has the dsl modem connected to it.

Here is the iptables config script I used:

```
#!/bin/bash

echo 1 > /proc/sys/net/ipv4/ip_forward

#Allow loopback access:

/sbin/iptables -A INPUT -i lo -p all -j ACCEPT

/sbin/iptables -A OUTPUT -o lo -p all -j ACCEPT

#Block loopback from remote computers

/sbin/iptables -A INPUT -p all -s localhost -i ppp0 -j DROP

/sbin/iptables -A INPUT -p tcp --dport 21 -j REJECT

/sbin/iptables -A INPUT -p tcp --dport 23 -j REJECT

/sbin/iptables -A INPUT -p tcp --dport 1080 -j REJECT

/sbin/iptables -A INPUT -p tcp --dport 1900 -j REJECT

/sbin/iptables -A INPUT -p tcp --dport 5000 -j REJECT

/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o ppp0 -j MASQUERADE

/sbin/iptables -A PREROUTING -t nat -p tcp --dport 49000:52000 -i ppp0 -j DNAT --to 192.168.0.2:49000-52000
```

Here is my /etc/conf.d/net file

```
# Copyright 1999-2002 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License, v2 or later

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.5 2002/09/07 13:31:29 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface

#

iface_eth0="192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0"

iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

#iface_eth0="dhcp"

#iface_eth1="dhcp"

#dhcpcd_eth0="..."

# For adding aliases to a interface

#

#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.

#

# To add a custom netmask/broadcast address to created aliases,

# uncomment and change accordingly.  Leave commented to assign

# defaults for that interface.

#

#broadcast_eth0="192.168.0.255 192.168.0.255"

#netmask_eth0="255.255.255.0 255.255.255.0"

# For setting the default gateway

#

#gateway="eth0/192.168.0.1"
```

Have I missed something? I'm a linux n00b, so most likely I have hehe  :Wink: 

Do I have to put 192.168.0.1 into my hosts file? I can't ping the other box from either pc.

----------

## BonezTheGoon

What is the IP of the Windows2000 box?  It must be on 192.168.0.x subnet given your netmask you have (255.255.255.0, and your broadcast of 192.168.0.255 which should both be fine--I'm just checking with you), or you will not be able to see it.

Also are you sure your cross-over is truly a cross-over, and that it is good?

Regards,

BonezTheGoon

----------

## axxessdenied

I set the IP of the win2k box to 192.168.0.2 Subnet is 255.255.255.0 and Gateway is set to 192.168.0.1.

Yeah, it's a crossover cat5, when the computers are hooked up to each other, you can see that there is some sort of communication going on between the two of the computers because the lights on both of the NIC cards light up and flash as well... if it was a dud, there would be no light on...

I can get my dad's friend to bring me another xcat5, but this one should work.

----------

## neuron

/me 's the guy that gave him the script and help him set the basics up, and I got some time now, so I'll see if I can help you.

First a few things, install a ftpd and try to connect from the windows box to the linux box to make sure that connection works fine.

When your testing the windows box to the net, make sure you try to test without dns first (in case you got that part wrong, though it's not a huge part).

Also, my /usr/src/linux/.config 's network part looks like this, you may wanna make it a lot like mine  :Wink: 

I'm only gonna include the =y and =m ones to save some space  :Smile: 

```

#

# Networking options

#

CONFIG_PACKET=y

CONFIG_NETFILTER=y

CONFIG_UNIX=y

CONFIG_INET=y

CONFIG_IP_MULTICAST=y

CONFIG_IP_ADVANCED_ROUTER=y

CONFIG_NET_IPIP=m

CONFIG_SYN_COOKIES=y

#

#   IP: Netfilter Configuration

#

CONFIG_IP_NF_CONNTRACK=y

CONFIG_IP_NF_FTP=y

CONFIG_IP_NF_IRC=y

CONFIG_IP_NF_QUEUE=m

CONFIG_IP_NF_IPTABLES=y

CONFIG_IP_NF_MATCH_LIMIT=y

CONFIG_IP_NF_MATCH_MAC=y

CONFIG_IP_NF_MATCH_MARK=y

CONFIG_IP_NF_MATCH_MULTIPORT=y

CONFIG_IP_NF_MATCH_TOS=y

CONFIG_IP_NF_MATCH_AH_ESP=y

CONFIG_IP_NF_MATCH_LENGTH=y

CONFIG_IP_NF_MATCH_TTL=y

CONFIG_IP_NF_MATCH_TCPMSS=y

CONFIG_IP_NF_MATCH_STATE=y

CONFIG_IP_NF_MATCH_UNCLEAN=m

CONFIG_IP_NF_MATCH_OWNER=m

CONFIG_IP_NF_FILTER=y

CONFIG_IP_NF_TARGET_REJECT=y

CONFIG_IP_NF_TARGET_MIRROR=y

CONFIG_IP_NF_NAT=y

CONFIG_IP_NF_NAT_NEEDED=y

CONFIG_IP_NF_TARGET_MASQUERADE=y

CONFIG_IP_NF_TARGET_REDIRECT=y

CONFIG_IP_NF_NAT_SNMP_BASIC=m

CONFIG_IP_NF_NAT_IRC=y

CONFIG_IP_NF_NAT_FTP=y

CONFIG_IP_NF_MANGLE=y

CONFIG_IP_NF_TARGET_TOS=y

CONFIG_IP_NF_TARGET_MARK=y

CONFIG_IP_NF_TARGET_LOG=m

CONFIG_IP_NF_TARGET_ULOG=m

CONFIG_IP_NF_TARGET_TCPMSS=y

#

# QoS and/or fair queueing

#

CONFIG_NET_SCHED=y

CONFIG_NET_SCH_CBQ=y

CONFIG_NET_SCH_CSZ=m

CONFIG_NET_SCH_PRIO=m

CONFIG_NET_SCH_RED=m

CONFIG_NET_SCH_SFQ=y

CONFIG_NET_SCH_TEQL=m

CONFIG_NET_SCH_TBF=m

CONFIG_NET_SCH_GRED=m

CONFIG_NET_SCH_DSMARK=m

CONFIG_NET_SCH_INGRESS=y

CONFIG_NET_QOS=y

CONFIG_NET_ESTIMATOR=y

CONFIG_NET_CLS=y

CONFIG_NET_CLS_TCINDEX=y

CONFIG_NET_CLS_ROUTE4=y

CONFIG_NET_CLS_ROUTE=y

CONFIG_NET_CLS_FW=y

CONFIG_NET_CLS_U32=y

CONFIG_NET_CLS_RSVP=y

CONFIG_NET_CLS_RSVP6=y

CONFIG_NET_CLS_POLICE=y

```

----------

## eelcogelton

you should try installing samba ... it enables you to browse from your win-pc through your linuxpc

----------

## gwydion

I think some of these others are getting ahead of themselves, with the advice of installing apps to check connectivity - first things first, can you even do a simple ping?  Test from both sides, and see if it's the cable, or the settings on a single computer that're causing your problems.  If everything looks right there, what does your routing table look like?

```
bash-2.05a$ netstat -r

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

192.168.0.0     *               255.255.255.0   U        40 0          0 eth0

default         192.168.0.1     0.0.0.0         UG       40 0          0 eth0
```

That's a simple example of mine, I noticed this in your previous post:

 *Quote:*   

> # For setting the default gateway
> 
> #
> 
> #gateway="eth0/192.168.0.1"

 

Shouldn't the final line be uncommented there?  The last thing I would ask, is after you check all of the above, how are you setting up DNS on your Win2k box?  Are you specifying your linux box's ip for the dns server, or did you insert the public ip's of your isp's DNS servers?  If I remember correctly, either should work, as long as that default gateway is in place on the routing table.

gl, hth

gwydion

----------

## neuron

"I think some of these others are getting ahead of themselves"

I know the guy so I'm somewhat more informed about the situation  :Wink: 

"Shouldn't the final line be uncommented there? "

no it shouldn't, thats to use a gateway, not to be a gateway.

----------

## axxessdenied

Ok. I tried rebuilding the kernel using those settings that you posted, but it's giving me an error:

```
cls_route.c:153: structure has no member named `tclassid'

make[3]: *** [cls_route.o] Error 1

make[3]: Leaving Directory `/usr/src/linux-2.4.19/net/sched'

make[2]: *** [first_rule] Error 2

make[2]: Leaving Directory `/usr/src/linux-2.4.19/net/sched'

make[1]: *** [_subdir_sched] Error 2

make[1]: Leaving Directory `/usr/src/linux-2.4.19/net'

make: *** [_dir_net] Error 2
```

=\

----------

## gwydion

 *Quote:*   

> I know the guy so I'm somewhat more informed about the situation 

 

Doh!  ...open mouth, insert foot...   :Embarassed: 

sorry bout that, should've read a bit closer - my bad.

/me runs and hides in shame

----------

## neuron

CONFIG_NET_CLS=y

try commenting that line out.

It's a part of QoS, so I'm not too familiar with what you need and what you don't (you don't need it for internet sharing, but you need it for traffic shaping, which is neat and I'm gonna show you later  :Wink:  ).

----------

## axxessdenied

Ok, finally got around to messing around with my network some more, and I got it all working =]

----------

## TrippyZ

 *axxessdenied wrote:*   

> Ok, finally got around to messing around with my network some more, and I got it all working =]

 

And the solution was?

----------

## axxessdenied

After recompiling the kernel, I just went ahead and set up everything from scratch... I guess I must have misconfigured something.

----------

## Matje

Yeah, since you are using ethernet cards, it might be a good thing to actually put those into your iptables instead of the ppp-adapter of the other guy  :Wink: 

----------

## axxessdenied

No, since I have the exact same type of connection as him  :Wink: 

----------

