티스토리 뷰

분류없음

리눅스 NAT 구성

DogBull 2018.05.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
155,056
Today
3
Yesterday
81