Skip to content

Instantly share code, notes, and snippets.

@fagnersilva
Created March 16, 2017 14:06
Show Gist options
  • Save fagnersilva/37e0268797ccab4d03e17b8f4aacb8cd to your computer and use it in GitHub Desktop.
Save fagnersilva/37e0268797ccab4d03e17b8f4aacb8cd to your computer and use it in GitHub Desktop.
rede PVE e VM01
=============================================
Rede do Host PVE
=============================================
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.2.99
netmask 255.255.255.0
gateway 192.168.2.1
auto vmbr0
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
=============================================
Rede do VM01
=============================================
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.10.10.11
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
gateway 10.10.10.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 10.10.10.1
@fagnersilva
Copy link
Author

  • Pela vm01 (10.10.10.11) consigo resposta de ping nos IPs da rede 192.168.2.0/24 e pra Internet (8.8.8.8)

  • Por uma maquina da rede 192.168.2.0/24 não responde ping da rede 10.10.10.0/24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment