Created
May 28, 2020 08:55
-
-
Save BookGin/0f6a60b492196b68d6a4399fc0011513 to your computer and use it in GitHub Desktop.
iptables NAT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WAN="eno1" | |
LAN="eno2" | |
sysctl net.ipv4.ip_forward=1 | |
# make sure the default FORWARD policy is DROP | |
iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT | |
iptables -A FORWARD -i $WAN -o $LAN -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
# NAT | |
# You can add `-s 192.168.0.1/24` otherwise it will NAT all ips | |
iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(1) 為了增加論文內容的說服性,而美化研究圖表或過度詮釋研究結果。
(2) 在撰寫論文時,誠實且精確地呈現和報告研究資料。
(3) 因研究設計不周延,而耗費許多研究資源和社會成本。
(4) 將對該研究缺乏實質貢獻的人,納為論文的共同作者。