View previous topic :: View next topic |
Author |
Message |
lublue n00b
Joined: 08 Nov 2002 Posts: 13
|
Posted: Sun Nov 10, 2002 11:29 pm Post subject: Share Internet connection??? |
|
|
Does anyone knows how to share internet in Gentoo 1.4 between 2 computers, using gentoo as server? |
|
Back to top |
|
|
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Mon Nov 11, 2002 12:41 am Post subject: |
|
|
Read the IP-Masquerade-HOWTO.
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 ::. |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Sat Nov 16, 2002 6:03 pm Post subject: |
|
|
Just do:
Code: | iptables -t nat -A POSTROUTING -s ip.ip.ip.ip -j MASQUERADE |
To allow MASQUERADING from that ip... and then just:
Code: | echo '1' > /proc/net/sys/ipv4/ip_forward |
and there you go! |
|
Back to top |
|
|
Qubax Guru
Joined: 19 Jul 2002 Posts: 451 Location: Tirol, Austria
|
Posted: Sat Nov 16, 2002 11:17 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Hephaistos n00b
Joined: 14 Oct 2002 Posts: 8
|
Posted: Fri Dec 13, 2002 4:31 pm Post subject: |
|
|
Tried, but it returns: /proc/net/sys/ipv4/ip_forward no such file or directory (or something like it)
Why is that? |
|
Back to top |
|
|
Qubax Guru
Joined: 19 Jul 2002 Posts: 451 Location: Tirol, Austria
|
Posted: Fri Dec 13, 2002 4:37 pm Post subject: |
|
|
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? |
|
Back to top |
|
|
Hephaistos n00b
Joined: 14 Oct 2002 Posts: 8
|
Posted: Fri Dec 13, 2002 4:50 pm Post subject: |
|
|
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) |
|
Back to top |
|
|
Hephaistos n00b
Joined: 14 Oct 2002 Posts: 8
|
Posted: Fri Dec 13, 2002 5:26 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
Hephaistos n00b
Joined: 14 Oct 2002 Posts: 8
|
Posted: Sat Dec 14, 2002 12:59 pm Post subject: |
|
|
I found it!
/proc/sys/net/ipv4
and not
/proc/net/sys/ipv4 |
|
Back to top |
|
|
Decibels Veteran
Joined: 16 Aug 2002 Posts: 1623 Location: U.S.A.
|
|
Back to top |
|
|
|