iptables nat PREROUTING chain

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



Is there a way to add a rule to the nat table (CentOS 5.7) that would
alter the port number of tcp packets destined for the server itself?  I
have ip_forwarding enabled, but the packets don't seem to hit the
prerouting chain.

I have the following redirect rule in the prerouting table.  I also
tried DNAT, but if the packets don't hit PREROUTING, it won't work either.

iptables -t nat -L -v -n
Chain PREROUTING (policy ACCEPT 16079 packets, 896K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 REDIRECT   tcp  --  *      *       10.10.10.0/24           0.0.0.0/0           tcp dpt:25 redir ports 12345 


aspen 2# cat /proc/sys/net/ipv4/ip_forward 
1



Thanks,
Nataraj

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux