Re: iptables port forwarding

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



Dear all,
   Thanks very much for your kindly help! I use below codes to update the firewall, and it works now.
  
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat  -A PREROUTING -d 192.168.1.250 -p tcp -m tcp --dport 8080 -j DNAT --to-destination a.b.c.d:8181
iptables -t nat -A POSTROUTING -d a.b.c.d -p tcp --dport 8181 -j SNAT --to-source 192.168.1.250


At 2011-06-27,"John R Pierce" <pierce@xxxxxxxxxxxx> wrote: >On 06/27/11 12:05 AM, muiz wrote: >> [root@localhost ~]# /sbin/iptables -L > >note that doesn't show all the pertinent info. I prefer `iptable -L  >-vn`, and it still doesn't show the nat tables, you also need `iptable  >-L -vn -t nat` to see those chains, and `iptable -L -vn -t mangle` if  >you're using any mangle entries. > > > >--  >john r pierce                            N 37, W 122 >santa cruz ca                         mid-left coast >


_______________________________________________
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