chào,
minh đọc tài liệu mà chưa hiểu rỏ ý nghĩa 2 rules PostRouting & PreRouting trong Iptables, mấy bác giải thích ý nghĩ cho em hiểu qua mấy câu bên dưới giúp em nhé:
-A PREROUTING -d 172.16.0.0/255.240.0.0 -j RETURN
-A PREROUTING -p tcp --dport 110 -d 210.31.24.140 -j DNAT --to -destination 172.16.24.2:110
-A PREROUTING -i eth0 -p tcp -m multiport -s 10.3.0.0/255.255.0.0 --dport 80,81,1000,3000,8080 -j DNAT --to -destination 10.3.0.254:8081
( firewall có 2nic : internet <-->eth3(192.168.2.254)--eth0(10.3.0.254)<-->pc)
-A POSTROUTING -d 192.168.2.0/255.255.255.0 -j SNAT --to -source 192.168.2.254
-A PREROUTING -s 172.16.0.0/255.255.255.0 -j RETURN
the end
thanks
minh đọc tài liệu mà chưa hiểu rỏ ý nghĩa 2 rules PostRouting & PreRouting trong Iptables, mấy bác giải thích ý nghĩ cho em hiểu qua mấy câu bên dưới giúp em nhé:
-A PREROUTING -d 172.16.0.0/255.240.0.0 -j RETURN
-A PREROUTING -p tcp --dport 110 -d 210.31.24.140 -j DNAT --to -destination 172.16.24.2:110
-A PREROUTING -i eth0 -p tcp -m multiport -s 10.3.0.0/255.255.0.0 --dport 80,81,1000,3000,8080 -j DNAT --to -destination 10.3.0.254:8081
( firewall có 2nic : internet <-->eth3(192.168.2.254)--eth0(10.3.0.254)<-->pc)
-A POSTROUTING -d 192.168.2.0/255.255.255.0 -j SNAT --to -source 192.168.2.254
-A PREROUTING -s 172.16.0.0/255.255.255.0 -j RETURN
the end
thanks
Comment