利用iptables對端口重定向

iptables -t nat -A PREROUTING -p tcp -i eth1 -d ip* --dport 5999 -j DNAT --to ip*:5222

iptables-save > /etc/sysconfig/iptables

 

將連接到5999端口的鏈接轉交給5222

發佈了182 篇原創文章 · 獲贊 7 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章