insomniacslk/dublin-traceroute

Using wrong interface

eddie4 opened this issue · 1 comments

Hello let me start to thank you for this tool.

However i seem to run into an issue where it chooses the wrong source IP. When multiple are assigned to the networkcard.

Routing table:

root@web05:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         87.233.x.x   0.0.0.0         UG    0      0        0 ens3
10.233.x.0    0.0.0.0         255.255.255.0   U     0      0        0 ens3
10.233.x.0    0.0.0.0         255.255.255.0   U     0      0        0 ens3
87.233.x.x   0.0.0.0         255.255.255.240 U     0      0        0 ens3

root@web05:~# ip a

2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 56:16:d1:5b:58:fd brd ff:ff:ff:ff:ff:ff
    inet 87.233.x.x/28 brd 87.233.x.x scope global ens3
       valid_lft forever preferred_lft forever
    inet 10.233.x.x/24 brd 10.233.x.x scope global ens3
       valid_lft forever preferred_lft forever
    inet 10.233.x.x/24 brd 10.233.x.x scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::5416:d1ff:fe5b:58fd/64 scope link
       valid_lft forever preferred_lft forever

dublin-traceroute 87.233.y.y Trace.json

                "33453" :
                [
                        {
                                "flowhash" : 34136,
                                "is_last" : true,
                                "name" : "",
                                "received" : null,
                                "rtt_usec" : null,
                                "sent" :
                                {
                                        "ip" :
                                        {
                                                "dst" : "87.233.y.y",
                                                "src" : "10.233.x.x",
                                                "ttl" : 1
                                        },
                                        "timestamp" : "1597074875.919802",
                                        "udp" :
                                        {
                                                "dport" : 33453,
                                                "sport" : 12345
                                        }
                                }
                        }
                ]
        }

This does not seem to happen when using two network cards. Just when one networkcard has multiple IP's.

Hmm scratch that. It doesn't work on a machine that has multiple cards. It might have just worked on that one machine because the card i used has the lowest mac.

When disabling a card because I don't want to use that card the application crashs
ens3 (56:16:97:c7:33:32) << card which ip i want to use and has default gateway
ens4 (56:16:64:4e:3f:8a) << card dublin-traceroute picks

ip link set ens4 down
dublin-traceroute xxxxx

WARNING: you are running this program as root. Consider setting the CAP_NET_RAW
         capability and running as non-root user as a more secure alternative.
Starting dublin-traceroute
Traceroute from 0.0.0.0:12345 to xxxxx:33434~33453 (probing 20 paths, min TTL is 1, max TTL is 30, delay is 10 ms)
terminate called without an active exception
Aborted