IP 구성

기본 양식

sudo nano /etc/network/interfaces

### nano ###
auto ens33

iface ens33 inet static
	address [IP address]/[prefix]
	gateway [gateway]
### nano ###

systemctl restart networking
systemctl status networking

Default Routing

기본 양식

sudo nano /etc/network/interfaces

### nano ###
post-up ip route add default via [IP address] dev [iface]
### nano ###

systemctl restart networking
systemctl status networking
ip route show

SNAT

기본 양식

iptables -t nat -A POSTROUTING [IP 대역대] -o [iface] -j SNAT --to-source [변환 IP]
iptables -t nat -L -n -v

NAPT

기본 양식

iptables -t nat -A PREROUTING -i [iface] -p tcp --dport [port] -j DNAT --to-destination [IP address:port]
iptables -t nat -A PREROUTING -i [iface] -p udp --dport [port] -j DNAT --to-destination [IP address:port]
iptables -t nat -L -n -v