티스토리 뷰

카테고리 없음

리눅스 NAT 구성

DogBull 2018. 5. 19. 12:40

네트워크 구성



NAT Gateway

echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sysctl -p
firewall-cmd --direct --add-rule ipv4 nat POSTROUTING 0 -o eth_ext -j MASQUERADE
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth_int -o eth_ext -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth_ext -o eth_int -m state --state RELATED,ESTABLISHED -j ACCEPT


Client

  - Gateway: 192.168.0.1

  - DNS: 192.168.0.1


댓글
댓글쓰기 폼
Total
186,987
Today
6
Yesterday
39