# Share Internet connection???

## lublue

Does anyone knows how to share internet in Gentoo 1.4 between 2 computers, using gentoo as server?

----------

## zen_guerrilla

Read the IP-Masquerade-HOWTO.

```
emerge howto-text
```

If your connection is ppp msg me to send my firewall setup setup based on the "stronger" version of that how-to (newer than that included on the ebuild).

.:: zen ::.

----------

## darktux

Just do:

```
iptables -t nat -A POSTROUTING -s ip.ip.ip.ip -j MASQUERADE
```

To allow MASQUERADING from that ip... and then just:

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

 and there you go!

----------

## Qubax

you may also just use FIRE|GATE (don't know the homepage just now) or [url]projectfiles.com/firewall[/url]. these are simple firewall scripts including router function

----------

## Hephaistos

Tried, but it returns: /proc/net/sys/ipv4/ip_forward no such file or directory (or something like it)

Why is that?

----------

## Qubax

do you have sysctl in your kernel? i'm not sure. you may also look in /proc/net/ipv4/...

do you have these directories?

do you have the necessary modules?

----------

## Hephaistos

I just have /proc/net/ and I compiled anything under tcp/ip in to my gentoo-sources-kernel without ipv6 and httpd accel.

And iptables -t nat -A POSTROUTING -s ip.ip.ip.ip -j MASQUERADE works just fine. (want to say, works without prompting errors)

----------

## Hephaistos

Note: I have only /proc/net/, neither /proc/net/sys nor /proc/net/ipv4.

And by the way: Where can i find sysctl in my kernelconfig? Just cant find it.   :Sad: 

----------

## Hephaistos

I found it!

/proc/sys/net/ipv4

and not

/proc/net/sys/ipv4

----------

## Decibels

Not sure if your still interested in this, but you might find some useful information here: http://webpages.charter.net/decibelshelp/LinuxHelp_IPtables.html#ip_masq

----------

