Jump to content

Networking: Routing gone bad


Recommended Posts

Hello all! I've been introduced by Echylo to this forum, he says I won't be shouted at with RTFM's and such. Let's do hope so :)

 

Well, here's the problem:

 

I'm running Gentoo 2004.2 with kernel 2.6.3. (Ran 2.6.7 before but didn't really work out, so I went back to 2.6.3 since I know that one works superb.) I am trying to route my internet to a Windows 98 PC. This is my sisters, and she needs her internet. Internet works fine on my PC. And the routing worked before the format due to reasons you don't want to know. I have done exactly the same as I did last time, so I must've overlooked something. I have a connection between the 2 pc's. Since we can ping eachother. It's not a DNS problem. Since I cannot ping any website or IP with the other PC.

 

Well, here is what my "/etc/conf.d/net" contains:

 

# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.10.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_eth1="dhcp"
dhcpcd_eth1="-h co254461-a"

# 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.10.1"

 

Looks alright to me! :)

 

This is what my "/etc/conf.d/local.start" contains:

# /etc/conf.d/local.start:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002/11/18 19:39:22 azarah Exp $

# This is a good place to load any misc.
# programs on startup ( 1>&2 )

#enable ipforwarding echo "1" > /proc/sys/net/ipv4/ip_forward &&
#enable masquerading iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

 

Also looks good to me...

 

My LAN ethernet card is ETH0 and my internet ethernet card is ETH1.

 

 

I hope you guys can help me out, since I am sick of rebooting to WIndows just to get my sister some MSN loving... :P

 

Don't think me of a big-noob, I have expierence with Linux. At least. Enough for now. But on the other hand. I'm no Advanced hyper-tech nerd. (Too bad though.. ;) )

 

Greetings,

Hawai!

Link to comment
Share on other sites

#enable ipforwarding echo "1" > /proc/sys/net/ipv4/ip_forward &&
#enable masquerading iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

might wanna change these two lines to:

enable ipforwarding echo "1" > /proc/sys/net/ipv4/ip_forward &&
enable masquerading iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

having them commented out doesn't really help ;)

Link to comment
Share on other sites

I figured as much. However, I was told that without them, it wouldn't be read. And that a space between the # and lines would mean comment. Already thought he was crazy. This proves it. Next is then, since I tried it without comments before, and that gave an error. Namely this:

 * Stopping local...                                                      [ ok ]
* Starting local...
/sbin/runscript.sh: line 7: enable: ipforwarding: not a shell builtin
/sbin/runscript.sh: line 7: enable: 1: not a shell builtin
* Failed to start local.                                                 [ !! ]

Link to comment
Share on other sites

Those lines should read

#enable ipforwarding 
echo "1" > /proc/sys/net/ipv4/ip_forward &&
#enable masquerading 
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

Stick a couple of carriage returns in there!

 

Chris

note to self...read more carefully next time :wall: i just saw the #'s in front of the lines which needed to be executed and thought "get rid of the #'s!"

 

:oops:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...