iptables forwarding question

Benjamin Franz snowhare at nihongo.org
Fri Mar 17 14:28:41 UTC 2006


On Fri, 17 Mar 2006, James Pifer wrote:

> Is it possible to forward all traffic, not just a port, that comes from
> a specific ip address to another address? Let's say you're running
> iptables on a machine that is acting as a router on an internal network,
> so traffic by port is not blocked.
>
> I've been searching for rules and everything I'm finding is forwarding a
> specific port. Is this possible? If so, an example rule(s) would be
> appreciated.

Try

iptables -i ppp0 -t nat -A PREROUTING -j DNAT -s $remote_ip -d $local_ip --to-destination $internal_ip

-- 
Benjamin Franz




More information about the fedora-list mailing list