Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Share Internet connection???
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lublue
n00b
n00b


Joined: 08 Nov 2002
Posts: 13

PostPosted: Sun Nov 10, 2002 11:29 pm    Post subject: Share Internet connection??? Reply with quote

Does anyone knows how to share internet in Gentoo 1.4 between 2 computers, using gentoo as server?
Back to top
View user's profile Send private message
zen_guerrilla
Guru
Guru


Joined: 18 Apr 2002
Posts: 343
Location: Greece

PostPosted: Mon Nov 11, 2002 12:41 am    Post subject: Reply with quote

Read the IP-Masquerade-HOWTO.
Code:
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 ::.
Back to top
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Sat Nov 16, 2002 6:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Qubax
Guru
Guru


Joined: 19 Jul 2002
Posts: 451
Location: Tirol, Austria

PostPosted: Sat Nov 16, 2002 11:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hephaistos
n00b
n00b


Joined: 14 Oct 2002
Posts: 8

PostPosted: Fri Dec 13, 2002 4:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Qubax
Guru
Guru


Joined: 19 Jul 2002
Posts: 451
Location: Tirol, Austria

PostPosted: Fri Dec 13, 2002 4:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hephaistos
n00b
n00b


Joined: 14 Oct 2002
Posts: 8

PostPosted: Fri Dec 13, 2002 4:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hephaistos
n00b
n00b


Joined: 14 Oct 2002
Posts: 8

PostPosted: Fri Dec 13, 2002 5:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hephaistos
n00b
n00b


Joined: 14 Oct 2002
Posts: 8

PostPosted: Sat Dec 14, 2002 12:59 pm    Post subject: Reply with quote

I found it!
/proc/sys/net/ipv4
and not
/proc/net/sys/ipv4
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Tue Dec 17, 2002 3:52 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum