Host Config:
auto eth0
iface eth0 inet static
address 94.xxxxxxxxx
netmask 255.255.255.0
broadcast 94.xxxxxxxxx
auto vmbr0post-up iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 10022 -j DNAT --to-destination 10.10.10.2:22
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
Node/VM Config:
auto eth0
iface eth0 inet static
address 10.10.10.2
gateway 10.10.10.1
netmask 255.255.255.0
No comments:
Post a Comment