From: "Klemen Kecman" <klemen@sting.si>
To: netfilter@lists.netfilter.org
Cc: John Black <black@arbbs.net>
Subject: Re: netfilter question
Date: Thu, 19 Feb 2004 09:19:26 +0100 [thread overview]
Message-ID: <008301c3f6c1$1cbceb90$6a02a8c0@klemen> (raw)
In-Reply-To: 004f01c3f699$0ad70a00$ed02fea9@black
For dynamic IP (ADSL)
$IPT -t nat -A POSTROUTING -o $IF_INET -j MASQUERADE
and for static IP (Cable)
$IPT -A POSTROUTING -t nat -s $IP_LAN_RNG -o $IF_NET -j SNAT --to-source
$IP_NET
That is for routing. If you want to secure your network and the router
itselfe it takes alot more .. like setting up a firewall :)
Klemen Kecman
Sting d.o.o.
Smartinska 106
1000 Ljubljana - SI
+386 1 5246033
+386 41 456421
----- Original Message -----
From: "John Black" <black@arbbs.net>
To: <netfilter@lists.netfilter.org>
Sent: Thursday, February 19, 2004 4:32 AM
Subject: netfilter question
> I'm trying to install a gateway/router with Red Hat 9 kernel 2.4.24 and
the
> stock
> iptables 1.2.7a, with full NAT compiled into the kernel. I have read the
> howto
> at netfilter.org, even have the same line of code. But it sill will not
> change
> the source address.
>
> here is the line of code and the result of the command <iptables -L -nvx>
>
> iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,
RELATED -j
> ACCEPT
> iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
> iptables -A FORWARD -j LOG
>
> Chain INPUT (policy ACCEPT 127 packets, 9436 bytes)
> pkts bytes target prot opt in out source destination
>
>
> Chain FORWARD (policy ACCEPT 36 packets, 1709 bytes)
> pkts bytes target prot opt in out source
> destination
> 0 0 ACCEPT all -- eth0 eth1 0.0.0.0/0 0.0.0.0/0
> state RELATED, ESTABLISHED
>
> 0 0 ACCEPT all -- eth1 eth0 0.0.0.0/0 0.0.0.0/0
>
> 0 0 ACCEPT all -- * * 0.0.0.0/0
0.0.0.0/0
> LOG flags 0 level 4
>
> Chain OUTPUT (policy ACCEPT 74 packets, 8568 bytes)
> pkts bytes target prot opt in out source destination
>
>
> I new to security of a network. Am I close?
>
> thanks
> john
>
>
>
>
next prev parent reply other threads:[~2004-02-19 8:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 3:32 netfilter question John Black
2004-02-19 8:19 ` Klemen Kecman [this message]
2004-02-19 9:22 ` Antony Stone
2004-02-19 13:06 ` John Black
2004-02-19 13:17 ` Antony Stone
-- strict thread matches above, loose matches on Subject: below --
2004-02-19 13:38 John Black
2004-02-19 14:18 ` Antony Stone
2004-02-19 14:13 John Black
2004-02-19 14:51 ` Alexis
2004-02-19 16:00 John Black
2004-02-19 16:23 John Black
2004-02-19 17:06 ` Antony Stone
2004-02-19 16:56 John Black
2004-02-19 20:25 John Black
2004-02-19 21:22 ` Antony Stone
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='008301c3f6c1$1cbceb90$6a02a8c0@klemen' \
--to=klemen@sting.si \
--cc=black@arbbs.net \
--cc=netfilter@lists.netfilter.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