針對redmine訪問策略 iptables 設置方法

架設的redmine服務器不能訪問,經排查是防火牆iptables 設置的原因。

1)設置iptables並重啓服務

sudo /sbin/iptables -I INPUT -p tcp --dport 8087 -j ACCEPT

sudo /opt/redmine-3.0.1-0/ctlscript.sh restart


2)把iptables 策略寫入配置檔案,永久生效。

sudo iptables-save > /etc/iptables.rules

vim /etc/network/interfaces

寫入:

pre-up iptables-restore < /etc/iptables.rules

pre-up iptables-restore --noflush < /etc/iptables.custom



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章