2

I have the following situation on my host:

                            veth5
                          10.0.0.3
                              o  
                              |
-----------------      ------------    -----------------                         eth0
|      veth1 o--| ---- |   br0    |----|--o         o--|----o               o------o------ internet
|     10.0.0.2  |      ------------    | veth3   veth6 |  veth7            ppp0
|               |                      |               | 192.168.1.2     192.168.100.169
|     client    |                      |    helper     |
-----------------                      -----------------

The routing configuration has been made using policy based routing. According to that, a packet sent from the host to the Internet (e.g., using ping) enters into my network through veth5, then goes in the namespace helper. From here, it is forwarded to veth7, then to ppp0 and reaches the Internet.

The output of ip rule command is:

0:     from all lookup local
2997:  from 192.168.1.2 lookup T2
2998:  from 192.168.100.169 lookup T2
2999:  from all iif lo lookup T3
3000:  from all iif veth7 lookup T1
3001:  from all iif ppp0 lookup T1
4000:  from all lookup T4
32766: from all lookup main
32767: from all lookup default

T1 table entries:

default dev ppp0 scope link
10.0.0.0.0/24 via 192.168.1.1 dev veth7
192.168.1.0/24 dev veth7 scope link
192.168.100.180 dev ppp0 scope link

T2 table entries:

default dev ppp0 scope link
10.0.0.0.0/24 via 192.168.1.1 dev veth7
192.168.1.0/24 dev veth7 scope link
192.168.100.180 dev ppp0 scope link

T3 table entries:

default via 10.0.0.1 dev veth5
10.0.0.0/24 dev veth5 scope link

T4 table entries:

broadcast 10.0.0.0 dev veth5 proto kernel scope link src 10.0.0.3
local 10.0.0.3 dev veth5 proto kernel scope host src 10.0.0.3
broadcast 10.0.0.255 dev veth5 proto kernel scope link src 10.0.0.3

local table entries:

broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.1.0 dev veth7 proto kernel scope link src 192.168.1.2
local 192.168.1.2 dev veth7 proto kernel scope host src 192.168.1.2
broadcast 192.168.1.255 dev veth7 proto kernel scope link src 192.168.1.2
broadcast 192.168.100.0 dev ppp0 proto kernel scope link src 192.168.100.169
local 192.168.100.169 dev ppp0 proto kernel scope host src 192.168.100.169

The main table and the default table are empty.

If I ping 8.8.8.8 from the host, I have back a response, but if I ping, e.g., www.google.com the DNS response arrives at ppp0 but it is not forwarded to veth7. I have the same problem when I send TCP packets: the SYN-ACK packet from a server reaches the ppp0 interface but it is not forwarded to the veth7 interface according to the routing rules. I guess this problem is in some way related to the layer 4 of the packets, but I cannot figure out how.

However, if I execute the command ping wwww.google.com from the namespece client, I receive back the answer.

I'm using Ubuntu 14.04.1 with a kernel version 4.4.0-96-generic.

Can someone help me? Any suggestion/help is more than welcome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.