차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
routing_및_forwarding [2021/05/04 05:18] – 만듦 koov | routing_및_forwarding [2021/05/04 05:18] (현재) – koov | ||
---|---|---|---|
줄 10: | 줄 10: | ||
iptables -I FORWARD 1 -i kbenp0s31f6 -o virbr51 -j ACCEPT | iptables -I FORWARD 1 -i kbenp0s31f6 -o virbr51 -j ACCEPT | ||
iptables -I FORWARD 1 -i virbr51 -o kbenp0s31f6 -j ACCEPT | iptables -I FORWARD 1 -i virbr51 -o kbenp0s31f6 -j ACCEPT | ||
+ | |||
+ | # NAT를 추가할경우 | ||
iptables -t nat -I POSTROUTING 1 -o kbenp0s31f6 -j MASQUERADE | iptables -t nat -I POSTROUTING 1 -o kbenp0s31f6 -j MASQUERADE | ||
</ | </ | ||
줄 19: | 줄 21: | ||
firewall-cmd --direct --add-passthrough ipv4 -I FORWARD 1 -i kbenp0s31f6 -o virbr51 -j ACCEPT | firewall-cmd --direct --add-passthrough ipv4 -I FORWARD 1 -i kbenp0s31f6 -o virbr51 -j ACCEPT | ||
firewall-cmd --direct --add-passthrough ipv4 -I FORWARD 1 -i virbr51 -o kbenp0s31f6 -j ACCEPT | firewall-cmd --direct --add-passthrough ipv4 -I FORWARD 1 -i virbr51 -o kbenp0s31f6 -j ACCEPT | ||
+ | |||
+ | # NAT를 추가할경우 | ||
firewall-cmd --direct --add-passthrough ipv4 -t nat -I POSTROUTING 1 -o kbenp0s31f6 -j MASQUERADE | firewall-cmd --direct --add-passthrough ipv4 -t nat -I POSTROUTING 1 -o kbenp0s31f6 -j MASQUERADE | ||
</ | </ | ||
</ | </ | ||