View previous topic :: View next topic |
Author |
Message |
PARENA Guru
Joined: 06 Jan 2003 Posts: 349
|
Posted: Sat Nov 06, 2004 12:09 pm Post subject: pc with laptop: network but no internet [SOLVED] |
|
|
Here is my situation: I've got a PC which gets it's info from my ISP dhcp-wise. No problems there, I have internet access. It's on eth0, of course. Then, there eth1, which I use to connect my laptop to via crosscable. This all used to work fine, until recently. I figure it was a messed up baselayout etc-update I did.
So, now I've got my eth1 in the pc which has 192.168.0.1 and the laptop eth0 with IP 192.168.0.2. They can talk to each other, no problem. But when I try to ping anything from my laptop, other than the PC, nothing happens. It can't find anything. I tried disableing the firewall, but that wasn't the problem. I bet it's in my iptables, though those haven't changed. Or perhaps I changed them, screwing it up even more... Anyway, this must be a problem people get a lot (couldn't find a solution searching, though). Anybody have an idea?
Oh yeah, some extra information might come in handy.
/etc/conf.d/net on te pc:
<code>iface_eth0="dhcp"
iface_eth1="192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0"</code>
/etc/conf.d/net on the laptop:
<code>iface_eth0="192.168.0.2 broadcast=192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.0.1"</code>
Last edited by PARENA on Sat Nov 06, 2004 10:35 pm; edited 1 time in total |
|
Back to top |
|
|
GeoffOs n00b
Joined: 13 Dec 2003 Posts: 56 Location: Cheshire
|
Posted: Sat Nov 06, 2004 12:49 pm Post subject: Gateway !!!! |
|
|
What is your gateway on the laptop? _________________ Beyond a critical point within a finite space, freedom diminishes as numbers increase. ...
The human question is not how many can possibly survive within the system, but what kind of existence is possible for those who do survive." |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54605 Location: 56N 3W
|
Posted: Sat Nov 06, 2004 1:01 pm Post subject: |
|
|
PARENA,
On the laptop do
Code: | route
ifconfig
less /etc/resolv.conf | and post the output. That will show what is actually set as opposed to what you think you have set up. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
80686 n00b
Joined: 07 Jun 2004 Posts: 18 Location: /home/manuel
|
Posted: Sat Nov 06, 2004 2:58 pm Post subject: |
|
|
is /proc/sys/net/ipv4/ip_forward set to 1? _________________ --
god is real,
unless he's integer |
|
Back to top |
|
|
PARENA Guru
Joined: 06 Jan 2003 Posts: 349
|
Posted: Sat Nov 06, 2004 8:14 pm Post subject: |
|
|
Thanks for all the replies. The problem was the ip_forward was 0. But how does that happen and why do I have to set it to 1 manually. Do I have to do that every time the pc boots? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54605 Location: 56N 3W
|
Posted: Sat Nov 06, 2004 8:26 pm Post subject: |
|
|
PARENA,
There is an ioctrl for that but I forget what it is.
Add the command to /etc/conf.d/local.start exactly as you type it and it will be run at every boot for you.
I think its also a kernel option but thats a rebuild. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
PARENA Guru
Joined: 06 Jan 2003 Posts: 349
|
Posted: Sat Nov 06, 2004 10:35 pm Post subject: |
|
|
I'll be looking for that kernel option, I don't mind recompiling. Hopefully I can get rid of this problem once and for all. |
|
Back to top |
|
|
80686 n00b
Joined: 07 Jun 2004 Posts: 18 Location: /home/manuel
|
Posted: Sun Nov 07, 2004 12:55 am Post subject: |
|
|
As I know you HAVE to set it manually to 1. The kernel is made to behave like that.
What could be is the you've changed something in /etc/conf.d/iptables.
There you can control if /proc/sys/net/ipv4/ip_forward should be set to 1 when /etc/init.d/iptables will be executed on bootime. _________________ --
god is real,
unless he's integer |
|
Back to top |
|
|
|