@piepie01
Account:piepie01 password:nasa2020
192.168.127.128
192.168.127.127
172.16.x.x
VM:Arvin
VM:127
Your PC
192.168.127.128
192.168.127.127
Public IP
Your PC
server
192.168.127.128
192.168.127.127
172.16.x.x
VM:Arvin
VM:127
Your PC
Routing
NAT
You should be able to connect to external network here.
192.168.127.128
192.168.127.127
172.16.x.x
VM:Arvin
VM:127
Your PC
Routing
NAT
192.168.127.128
192.168.127.127
172.16.x.x
VM:Arvin
VM:127
Your PC
sudo route add -net 0.0.0.0 netmask 0.0.0.0 \
gw 192.168.127.127
192.168.127.128
192.168.127.127
Public IP
Your PC
server
192.168.127.128
192.168.127.127
172.16.x.x
VM:Arvin
VM:127
Your PC
iptables -t nat -A POSTROUTING -s 192.168.127.0/255.255.255.0 -o ens33 -j MASQUERADE
iptables -A FORWARD -s 192.168.127.0/255.255.255.0 -o ens33 -j ACCEPT
iptables -A FORWARD -d 192.168.127/255.255.255.0 -m state --state ESTABLISHED,RELATED \
-i ens33 -j ACCEPT
PREROUTING
NAT
FORWARD
filter
POSTROUTING
NAT
Packet in
Packet out
PREROUTING
NAT
FORWARD
filter
POSTROUTING
NAT
Packet in
Packet out
iptables -t nat -A POSTROUTING -s 192.168.127.0/255.255.255.0 -o ens33 -j MASQUERADE
iptables -A FORWARD -s 192.168.127.0/255.255.255.0 -o ens33 -j ACCEPT
iptables -A FORWARD -d 192.168.127/255.255.255.0 -m state --state ESTABLISHED,RELATED \
-i ens33 -j ACCEPT
Your turn~
192.168.127.128
192.168.127.127
172.16.x.x
VM:Arvin
VM:127
Your PC
ssh server
PREROUTING
NAT
FORWARD
filter
POSTROUTING
NAT
Packet in
Packet out
192.168.127.128
192.168.127.127
172.16.x.x
VM:Arvin
VM:127
Your PC
ssh server : 22
Forward