public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Daniel Iliev <danny@ilievnet.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Need help networking two machines.
Date: Sat, 13 Jan 2007 11:57:02 +0200	[thread overview]
Message-ID: <45A8ACEE.3070107@ilievnet.com> (raw)
In-Reply-To: <45A8A0E5.8080407@exceedtech.net>

Dale wrote:
> I ran those commands and it now works fine. I can ssh and everything.
> When I run /etc/init.d/iptables save, where does it save those too?  I
> want to save the rules I had, just in case.  I thought it was in /var
> somewhere but I can't find it. 
>
>   

- It is defined in "/etc/conf.d/iptables" as variable named IPTABLES_SAVE.

> I need to learn iptables I guess.  It looks like those commands open
> everything up.  I also don't know if it will connect the second rig to
> the net through my main box.  Something I'll have to test out later.
>   
No, it would not connect the second rig to The Internet if you use reserved IP addresses (eg. 10.X.X.X or 192.168.X.X). In that case you have to enable ip forwarding and network address translation (NAT) on the rig which is connected to The Internet.  May be it is a good start to read the "Home Router Guide" [1]. 
The following quick & dirty guide  should be suffucient:

1) put "net.ipv4.ip_forward = 1" in "/etc/sysctl.conf"
2) sysctl -p
3) iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
(replace "ethX" with the name of the interface connected to The Internet)
4) /etc/init.d/iptables save
5) rc-update -a iptables default


Please, read the guide [1] provided by Gentoo. The solution I'm showing here is really dirty because it doesn't provide any security.


[1] http://www.gentoo.org/doc/en/home-router-howto.xml
 
-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2007-01-13 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12 10:09 [gentoo-user] Need help networking two machines Dale
2007-01-12 11:21 ` Daniel Iliev
2007-01-12 18:08   ` Dale
2007-01-12 18:22     ` Thomas Lingefelt
2007-01-13  9:05       ` Dale
2007-01-13  9:57         ` Daniel Iliev [this message]
2007-01-14 20:55 ` Mick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45A8ACEE.3070107@ilievnet.com \
    --to=danny@ilievnet.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox