From: "Chuanwen Wu" <wcw8410@gmail.com>
To: gentoo-user <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] iptables configuration problem
Date: Mon, 14 May 2007 19:23:49 +0800 [thread overview]
Message-ID: <7797aa370705140423p2f320d5akfc18fc71e0f10a52@mail.gmail.com> (raw)
In-Reply-To: <200705140748.34409.nbensa@gmx.net>
2007/5/14, Norberto Bensa <nbensa@gmx.net>:
> Chuanwen Wu wrote:
> > I have tried set all the gw in my subnet to 192.168.1.254 or 192.168.1.1.
> > Is't all right?
>
> I don't know, it depends on what's your gw's IP is.
>
> Let's say you have this setup:
>
>
> GW: 192.168.1.1
>
> Other PCs are: 192.168.1.2... 192.168.1.3... and so on.
>
>
> On the GW you need:
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
> (note: change ethX by the NIC your internet connection is on. If your
> cablemodem/adsl/whatever is on eth3 -for example- change ethX to eth3)
>
>
> On the others PC you need to set GW to 192.168.1.1
>
>
> I hope this helps.
>
> Best regards,
> Norberto
>
Thank you!I think i have done what you meant.
Here is the information:
/etc/conf.d/net in the server
config_eth0=( "202.114.10.134 netmask 255.255.255.0 brd 202.114.10.255" )
routes_eth0=( "default gw 202.114.10.129" )
config_eth1=( "192.168.1.63 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth1=( "default gw 192.168.1.1" )
/etc/conf.d/net in one PC
config_eth0=( "192.168.1.35 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth0=( "default gw 192.168.1.1" )
--
wcw
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2007-05-14 11:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-13 14:41 [gentoo-user] iptables configuration problem Chuanwen Wu
2007-05-13 15:03 ` Fabio A Correa
2007-05-14 3:31 ` Chuanwen Wu
2007-05-14 3:56 ` Norberto Bensa
[not found] ` <7797aa370705140218s1ee9b7b4yea52a7140b031b05@mail.gmail.com>
2007-05-14 10:48 ` Norberto Bensa
2007-05-14 11:23 ` Chuanwen Wu [this message]
2007-05-14 14:58 ` Norberto Bensa
2007-05-14 21:36 ` Dan Farrell
2007-05-15 2:35 ` Chuanwen Wu
2007-05-15 2:49 ` Dan Farrell
2007-05-15 3:10 ` Chuanwen Wu
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=7797aa370705140423p2f320d5akfc18fc71e0f10a52@mail.gmail.com \
--to=wcw8410@gmail.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