Skip to content

Instantly share code, notes, and snippets.

@jbadiapa
Last active April 17, 2017 12:35
Show Gist options
  • Save jbadiapa/51362ad81edefded6849d6c054dbc177 to your computer and use it in GitHub Desktop.
Save jbadiapa/51362ad81edefded6849d6c054dbc177 to your computer and use it in GitHub Desktop.
+----------------------------------------+
| |
| Virt-Host |
| |
| | +-----------+
| | | |
| +-------+ +----------------------+ | | Laptop |
| | | | Undercloud | | | |
| |Ovr-net| | IP-under | | +-----------+
| | | | | |
| +-------+ +----------------------+ |
| |
+----------------------------------------+
We assume that:
Virt-Host IP = 192.168.1.5
Ovr-net = 192.168.24.0/24
Ovr-public-addr = 10.0.0.5
Undercloud-IP = 192.168.23.45
Laptop IP = 192.168.1.98
HOME-Net = 192.168.1.0/24
Log in into the Virt-Host console as root and execute:
# ip route add 192.168.24.0/24 via 192.168.23.45
# ip route add 10.0.0.0/24 via 192.168.23.45
# iptables -I FORWARD 3 -s 192.168.1.0/24 -o brext -j ACCEPT
# iptables -I FORWARD 4 -s 10.0.0.5/32 -o brext -j ACCEPT
# iptables -I FORWARD 5 -d 192.168.1.0/24 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
# iptables -I FORWARD 6 -d 10.0.0.5/32 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
On the laptop as root execute:
# ip route add 192.168.23.0/24 via 192.168.1.5
# ip route add 192.168.24.0/24 via 192.168.1.5
# ip route add 10.0.0.5/24 via 192.168.1.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment