Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem getting my Win2k box to connect to my Gentoo Box.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
axxessdenied
n00b
n00b


Joined: 12 Dec 2002
Posts: 6

PostPosted: Thu Dec 12, 2002 9:09 pm    Post subject: Problem getting my Win2k box to connect to my Gentoo Box. Reply with quote

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:
Code:
#!/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
Code:
# 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 ;)

Do I have to put 192.168.0.1 into my hosts file? I can't ping the other box from either pc.
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Thu Dec 12, 2002 11:34 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
axxessdenied
n00b
n00b


Joined: 12 Dec 2002
Posts: 6

PostPosted: Fri Dec 13, 2002 1:29 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Fri Dec 13, 2002 11:21 am    Post subject: Reply with quote

/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 ;)

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

Code:

#
# 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
Back to top
View user's profile Send private message
eelcogelton
n00b
n00b


Joined: 27 Aug 2002
Posts: 24
Location: Holland

PostPosted: Fri Dec 13, 2002 11:41 am    Post subject: Reply with quote

you should try installing samba ... it enables you to browse from your win-pc through your linuxpc
Back to top
View user's profile Send private message
gwydion
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 151
Location: Michigan, USA

PostPosted: Fri Dec 13, 2002 2:45 pm    Post subject: Jumping the gun Reply with quote

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?

Code:
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
_________________
Linux User #223670
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Fri Dec 13, 2002 3:08 pm    Post subject: Reply with quote

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

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


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

no it shouldn't, thats to use a gateway, not to be a gateway.
Back to top
View user's profile Send private message
axxessdenied
n00b
n00b


Joined: 12 Dec 2002
Posts: 6

PostPosted: Fri Dec 13, 2002 7:01 pm    Post subject: Reply with quote

Ok. I tried rebuilding the kernel using those settings that you posted, but it's giving me an error:
Code:
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

=\
Back to top
View user's profile Send private message
gwydion
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 151
Location: Michigan, USA

PostPosted: Fri Dec 13, 2002 8:06 pm    Post subject: Reply with quote

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


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

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

/me runs and hides in shame
_________________
Linux User #223670
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Sat Dec 14, 2002 11:15 am    Post subject: Reply with quote

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 ;) ).
Back to top
View user's profile Send private message
axxessdenied
n00b
n00b


Joined: 12 Dec 2002
Posts: 6

PostPosted: Fri Dec 27, 2002 9:05 pm    Post subject: Reply with quote

Ok, finally got around to messing around with my network some more, and I got it all working =]
Back to top
View user's profile Send private message
TrippyZ
n00b
n00b


Joined: 04 Dec 2002
Posts: 38

PostPosted: Sun Dec 29, 2002 10:13 pm    Post subject: Reply with quote

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


And the solution was?
Back to top
View user's profile Send private message
axxessdenied
n00b
n00b


Joined: 12 Dec 2002
Posts: 6

PostPosted: Tue Dec 31, 2002 5:02 am    Post subject: Reply with quote

After recompiling the kernel, I just went ahead and set up everything from scratch... I guess I must have misconfigured something.
Back to top
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 619
Location: Hasselt, Belgium

PostPosted: Tue Dec 31, 2002 10:14 am    Post subject: Reply with quote

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 ;-)
_________________
Life is like a box of chocolates... Before you know it, it's empty...
Back to top
View user's profile Send private message
axxessdenied
n00b
n00b


Joined: 12 Dec 2002
Posts: 6

PostPosted: Sat Jan 04, 2003 4:45 am    Post subject: Reply with quote

No, since I have the exact same type of connection as him ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum