Ask Your Question

Where I can find iptables rules of the virtual router

asked 2018-07-06 06:03:42 -0500

amirdhaoui gravatar image

I installed OpenStack Queens on Ubuntu. I created a virtual router to interconnect Private to external LAN. I am facing connectivity problems and I want to check rules in the router.

Where I can find these rules. Thanks for any help.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2018-07-06 09:11:43 -0500

amirdhaoui gravatar image

updated 2018-07-06 09:12:10 -0500

I found how:

run this command :

ip netns

You can run a command inside a network namespace using the ip netns exec command. For example, to see the interface configuration inside the DHCP server:

ip netns exec qdhcp-88b1609c-68e0-49ca-a658-f1edff54a264 ip addr

edit flag offensive delete link more


Run a shell ip netns exec qrouter-xyz /bin/bash, then have fun listing netfilter rules, routing table, source routing ... See, old but still useful.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-06 21:17:36 -0500 )edit

answered 2018-07-09 02:15:58 -0500

itlinux gravatar image

ip netns exec qrouter-xxxx bash

iptables -xnvL

will show all the rules but nat

iptables -xnvL -t nat

will show all including the NAT.

edit flag offensive delete link more

answered 2018-07-09 08:39:13 -0500

tze gravatar image

Openstack for every network device (router, dhcp agent) creates and net namespace, so as correct you find the ip netns returns the net namespaces, so with ip netns exec you can run commands that not know what net namespace mean, or you can use other utilities that can bind directly to linux net namespaces. I preface to run :

ip netns exec <net namespace> bash

and then i start to work in the enviroment as o was without net namespaces.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-07-06 06:03:42 -0500

Seen: 805 times

Last updated: Jul 09 '18