Home > other >  Iptables NAT forwarding configuration rules
Iptables NAT forwarding configuration rules

Time:09-29

(7) CentOS firewall: 192.168.1.2 instead
Server: 192.168.1.3
Client: 192.168.1.4


Now with the 192.168.1.2 instead receive 3333 UDP port forwarding to 192.168.1.3
The following rule configuration available

Iptables -t NAT -i PREROUTING - p udp -- dport 3333 - j DNAT - to 192.168.1.3
The iptables -t NAT -i POSTROUTING -p udp -- dport 3333 - j MASQUERADE

But there is a problem, I think all set for an inbound, then only allow white list is sent to the customer 192.168.1.2 instead to forwarding, set the Filter but is not available, just skip the Filter,


Filter rules: iptables -a INPUT -s 192.168.1.4 -p udp -- dport 3333 - j ACCEPT

Thank you for your answer!

Best can paste solution, thank you
  • Related