[ILUGC] Re: iptables - howto properly MASQUERADE

  • From: Arun Khan <knura9@xxxxxxxxx>
  • To: ILUG-Chennai <ilugc@xxxxxxxxxxxxx>
  • Date: Mon, 14 Aug 2017 17:27:30 -0700

On Sun, Aug 13, 2017 at 12:22 AM, MohanR <mohan43u@xxxxxxxxx> wrote:


On Sat, 2017-08-12 at 22:57 -0700, Arun Khan wrote:

I don't think you need to if all your VMs and Containers are in the
same IP subnet as the "host" and the host has a path to the Internet.
If not then you need to describe your network topology is some
detail.
Here is my network details. In Host details, veth11923eth0@if2 is
attached to bridge0.

Host:

$ (ip route; echo; ip link | grep '^[0-9]')
default via 10.0.0.1 dev ens3  proto static  metric 100
10.0.0.0/24 dev ens3  proto kernel  scope link  src 10.0.0.74  metric
100
10.0.2.0/24 dev bridge0  proto kernel  scope link  src 10.0.2.1

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
mode DEFAULT group default qlen 1000
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
4: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP mode DEFAULT group default qlen 1000
10: veth11923eth0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue master bridge0 state UP mode DEFAULT group default qlen 1000
$

Container:

$ (ip route; echo; ip link | grep '^[0-9]')
default via 10.0.2.1 dev eth0
10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.222

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
mode DEFAULT group default qlen 1000
2: eth0@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP mode DEFAULT group default qlen 1000
$

The above may be very clear to but I'm lost*.  Can you hand draw a
topology diagram and  post a link to it?  Using different colors would
be useful to show the different network segments.

* (I don't have the inclination to read through routing tables and
decipher your topology)

-- Arun Khan
_____________________________________
ILUGC List: //www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: