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 - 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 02-14-2008, 12:57 PM   #1
nahuelSkpr
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
Linux -> XP LAN. doesn't work Internet but ssh yes


Hello my name is Nahuel, I'm new in the forum.
My quesetion is as follows
I've made a small lan at home with two PC, one with gentoo (2.6.23-r8) and the other with WinXp. The problem I have is that i can connect with ssh from the PC with xp (using a live CD of gentoo) to my PC with the installed gentoo, but the Internet doesn't work.
Here, the datails.
gentoo PC:
eth0 ( 192.168.1.2 ) -> inet
eth1 ( 192.168.2.1 ) -> lan
iptables nat:
iptables -t nat -A POSTROUTNG -s 192.168.2.0/24 -j MASQUERADE
XP PC:
Lan ip ( 192.168.2.2 )

Any ideas of what could be happening ? Any other information you need?

Thanks
 
Old 02-14-2008, 03:30 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Your ISP should supply a valid IP for the WAN connection (192.168.x.x is only valid as a LAN address). Usually, this will be done with DHCP, so your ethernet config file should specify this. I don't know how Gentoo configures networking, but if it is like Redhat, it should contain something like
( /etc/sysconfig/network-scripts/ifcfg-eth0 )
Code:
ONBOOT=yes
DEVICE=eth0
BOOTPROTO=dhcp
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
Note the 'BOOTPROTO' line.

Use something like firestarter to configure your Linux host as a firewall/router.

--- rod.
 
Old 02-15-2008, 10:39 AM   #3
nahuelSkpr
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Well I have a WAN IP from my ISP. I know 192.168.x.x is only valid as LAN address, but shouldn't be my adsl modem doing dchp? Am I wrong ?
 
Old 02-15-2008, 12:30 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Yes, the DSL modem, or likely something upstream, should be providing DHCP services. However, you said
Quote:
eth0 ( 192.168.1.2 ) -> inet
which does not make sense. If you are saying that the DHCP server assigned the 192.168... address, then I suggest you double check that, because I cannot imagine any ISP's DHCP server assigning that address. What, if anything, have you done to configure the eth0 interface?
--- rod.
 
Old 02-15-2008, 12:45 PM   #5
jdavis2
Member
 
Registered: Feb 2007
Distribution: Fedora, Mandrake, Knoppix, Windows XP
Posts: 37

Rep: Reputation: 15
Can you not get to the Internet from the Gentoo PC or the XP PC?

Also, are you actually using XP while using ssh to connect to the Gentoo PC or are you booting a Gentoo Live CD on the XP PC to ssh to your Gentoo PC?
 
Old 02-18-2008, 07:01 AM   #6
nahuelSkpr
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Hello budies.
theNbomr, I think I've been miss undertood. What I tried to mean when I say
eth0 ( 192.168.1.2 ) -> inet
I meant that it was the NIC that is going out to the internet, and the other one is the one that is being used to bring up the LAN between the two PCs. Thats why its not necessary dhcp here, because the IPs are assigned by me.
Well, the problem has been solved. Thanks averyone for helping out. Do you want to know what it was ? jejeje Do you remember the FORWARD chain from iptables ? Well it default policy was DROP !!! It seems to be that I changed it once, and I forgot to set the default as ACCEPT. Stupid one...

Thanks a lot
 
  


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
ssh does not work between two PCs of the LAN binary_dreamer Ubuntu 6 04-13-2007 10:43 PM
syntax for ssh to a given host on a LAN behind gateway/firewall from the internet Emmanuel_uk Linux - Networking 7 11-23-2006 12:37 PM
No Internet but LAN and VPN connect LAN work fine??? xavior SUSE / openSUSE 7 11-09-2005 01:14 PM
Help with wireless lan internet, nearly got it to work Belize Linux - Wireless Networking 10 10-27-2003 02:32 PM
ssh to multiple lan machines from the internet - How? v00d00101 Linux - Newbie 4 06-20-2003 01:39 PM

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

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