Private Network Forwarding

Dimitar Yanakiev

New Member
Jun 30, 2018
10
0
1
26
Hello, im trying to forward from host to guest via private network, the idea is the guest have working IPv6 with its own address, and is using IPv4 from the host for downloading stuff..

This is the configuration of the guest, ping6 google.com is working fine, but ping google.com is not it does get the IP of google but not pinging it.
Code:
~ # cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eth0
iface eth0 inet static
    address 10.20.30.3
    netmask 255.255.255.255
# --- BEGIN PVE ---
    post-up ip route add 10.20.30.1 dev eth0
    post-up ip route add default via 10.20.30.1 dev eth0
    pre-down ip route del default via 10.20.30.1 dev eth0
    pre-down ip route del 10.20.30.1 dev eth0
# --- END PVE ---
    hostname $(hostname)

auto eth1
iface eth1 inet6 static
    address 2a01:4f9:xx:xx::100
    netmask 32
    gateway 2a01:4f9:xx:xx::2

Host Configuration, im not sure if i should use eno1 or vmbr0, i tried both but none worked
net.ipv4.ip_forward is 1
Code:
# Private
auto vmbr1
iface vmbr1 inet static
    address 10.20.30.1
    netmask 255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    post-up iptables -t nat -A POSTROUTING -s '10.20.30.0/24' -o eno1 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '10.20.30.0/24' -o eno1 -j MASQUERADE

Any help is really great!
 
Code:
auto vmbr1
iface vmbr1 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 eno1 -j MASQUERADE
  post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE

I modified the config to this but yet nothing..
Full setup https://pastebin.com/kzcMt12b without the last part