7/23/2023 0 Comments Trafficbot ubuntu![]() Let's dissect this into the component parts. I have two docker subnets, two other networks ( static-local and InternalDHCP for my LXD containers), my wireless interface wlp59s0, and the 'default route' at the top. In both cases we need the ip route list output, but in my case we'll look at my laptop (NOT currently VPN'd because i'm on my home network): default via 172.18.0.1 dev wlp59s0 proto dhcp metric 600ġ0.10.0.0/16 dev static-local proto kernel scope link src 10.10.0.1ġ0.73.252.0/24 dev InternalDHCP proto kernel scope link src 10.73.252.1ġ0.74.0.0/24 dev docker0 proto kernel scope link src 10.74.0.1 linkdownġ69.254.0.0/16 dev docker0 scope link metric 1000 linkdownġ72.18.0.0/16 dev wlp59s0 proto kernel scope link src 172.18.2.0 metric 600Īs you can see I have several different things here on my network. ![]() ![]() (skip to the Your Routes section for my dissection of your routes output) There's two parts to finding this data out: first, determining what subnets are going directly out over a specific interface and then second, determining what the 'default route' of your traffic is to the Internet. Would it be safe to assume that the top default route is the one being used? I know the route command, but I can't really see how I will parse it to extract the information I need. This will make me differ between cases where vpn access is disabled (all goes through wlan0 -> read ip from that interface) or when vpn is activated (all goes through tun0, get ip of that interface). I am trying to figure out through which interface my traffic is routed and to get the local ip address associated with that interface.
0 Comments
Leave a Reply. |