Re: Mail Server Behind IPTABLES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2004-09-01 at 14:12, Matevz wrote:
> Thank you for ansver, but i think i will give up on this.
> 
> iptables -I POSTROUTING -p tcp -i eth0 -d 192.168.2.1 --dport 25 -j SNAT
> -to 192.168.2.2
> 
> than i get this:
> 
> Bad argument `192.168.2.2'

there's no POSTROUTING chain in the filter table--you need to specify
either "-t nat" or "-t mangle" as those are the tables that have such a
chain.  you also cannot use "-i" in POSTROUTING.  the SNAT target is
valid in the POSTROUTING chain of the nat table:

        iptables -t nat -I POSTROUTING -p tcp -o eth0 \
          -d 192.168.2.1 --dport 25 \
          -j SNAT --to-destination 192.168.2.2

is correct, syntax-wise.  whether it accomplishes what you want;
functionality-wise, is another question...

-j

-- 
Jason Opperisano <opie@xxxxxxxxxxx>



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux