issue193:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue193:c_c [2023/05/29 09:38] – auntiee | issue193:c_c [2023/05/30 15:57] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
**When you install Ubuntu, it covers a lot of bases for you that older Linux distros never used to. Oh, I recall trying to get my very first 3G dongle running in Aarvark, or the PCMCIA one in Warty Warthog. PPP was just not installed in Warty if I remember correctly. It took a moment to get me sorted, but the ‘happy ever after’ was that it worked! I recall trying to use a number of other distros, including Knoppix – the then defacto distro you used if you had odd hardware, and it just was not working with my no-name (ISP Branded) hardware. This was where my respect for Ubuntu started. Don’t get me wrong, I used Ubuntu, before it was Ubuntu, and though it was great, it was still a bit sucky when it came to hardware support. Luckily, I was semi-salted with network knowledge, so things were not such a mystery to me. This is what I want to impart to Ubuntu n00bs in this issue. A few issues ago we looked at ‘ip r’. Today, I want to take the next step in that direction as all you n00bs have obviously mastered ip r. So when I type ip r, I don’t need to explain.** | **When you install Ubuntu, it covers a lot of bases for you that older Linux distros never used to. Oh, I recall trying to get my very first 3G dongle running in Aarvark, or the PCMCIA one in Warty Warthog. PPP was just not installed in Warty if I remember correctly. It took a moment to get me sorted, but the ‘happy ever after’ was that it worked! I recall trying to use a number of other distros, including Knoppix – the then defacto distro you used if you had odd hardware, and it just was not working with my no-name (ISP Branded) hardware. This was where my respect for Ubuntu started. Don’t get me wrong, I used Ubuntu, before it was Ubuntu, and though it was great, it was still a bit sucky when it came to hardware support. Luckily, I was semi-salted with network knowledge, so things were not such a mystery to me. This is what I want to impart to Ubuntu n00bs in this issue. A few issues ago we looked at ‘ip r’. Today, I want to take the next step in that direction as all you n00bs have obviously mastered ip r. So when I type ip r, I don’t need to explain.** | ||
- | Quand vous installez Ubuntu, l’installation fait beaucoup de choses à votre place que les distros Linux moins récentes ne faisaient jamais. Je me souviens de mes efforts | + | Quand vous installez Ubuntu, l’installation fait beaucoup de choses à votre place que les distros Linux moins récentes ne faisaient jamais. Je me souviens de mes efforts |
**This time around, let us look at ‘route’. Consider the screenshot bottom left. | **This time around, let us look at ‘route’. Consider the screenshot bottom left. | ||
Ligne 25: | Ligne 25: | ||
In my case, we can see a packet going there via the 10.0.2.2 network on device enpos3, t he source was 10.0.2.15 (my VM), and the uid was 1000. Just like roads, you cannot simply hop on say, the N1, and drive straight to the supermarket. The supermarket may be located in Cherry Lane. To get to Cherry Lane, you need to turn right at Trent Road (don’t try, it is all fictitious). The same goes for your IP traffic. To get to 1.1.1.1 in Cherry Lane, I need to take a right at 10.0.2.2. This is the route that the IP traffic will take. Should you have more than one network interface, you can play traffic cop and route traffic all on your lonesome. You could now add a way for all traffic going to the 1.1.1.0 network to use enp1s3 for instance, with a simple command: ip r add 1.1.1.0/24 dev enp1s3 (*don’t do this, it is an example for you to understand the syntax, you will need to understand subnetting before attempting this). Anyway, once you do this, all traffic to 1.1.1.1 will now travel on enp1s3 instead of enp0s3. Typing ip route now, you will see that entry added. If you added this fake route to your machine, you can remove it with the same command, using del instead of add. ** | In my case, we can see a packet going there via the 10.0.2.2 network on device enpos3, t he source was 10.0.2.15 (my VM), and the uid was 1000. Just like roads, you cannot simply hop on say, the N1, and drive straight to the supermarket. The supermarket may be located in Cherry Lane. To get to Cherry Lane, you need to turn right at Trent Road (don’t try, it is all fictitious). The same goes for your IP traffic. To get to 1.1.1.1 in Cherry Lane, I need to take a right at 10.0.2.2. This is the route that the IP traffic will take. Should you have more than one network interface, you can play traffic cop and route traffic all on your lonesome. You could now add a way for all traffic going to the 1.1.1.0 network to use enp1s3 for instance, with a simple command: ip r add 1.1.1.0/24 dev enp1s3 (*don’t do this, it is an example for you to understand the syntax, you will need to understand subnetting before attempting this). Anyway, once you do this, all traffic to 1.1.1.1 will now travel on enp1s3 instead of enp0s3. Typing ip route now, you will see that entry added. If you added this fake route to your machine, you can remove it with the same command, using del instead of add. ** | ||
- | Dans mon cas, on peut voir un paquet qui y va via le réseau 10.0.2.2 sur le dispositif enpos3 ; l’adresse de la source était 10.0.2.15 (la machine virtuelle) et l’uid était 1000. Tout comme pour les routes, vous ne pouvez pas simplement rejoindre la N1 et aller tout droit au supermarché. Le supermarché se trouve peut-être dans Cherry Lane. Pour aller à Cherry Lane il faut tourner à droite à Trent Road (n’essayez pas, c’est de la fiction). C’est la même chose pour le trafic IP. Pour arriver à la 1.1.1.1 sur Cherry Lane, je dois tourner à droite à 10.0.2.2. C’est la route que prendra le trafic IP. Si vous avez plus d’un réseau, vous pouvez prétendre être un agent de la circulation et vous pouvez choisir la route pour le trafic | + | Dans mon cas, on peut voir un paquet qui y va via le réseau 10.0.2.2 sur le dispositif enpos3 ; l’adresse de la source était 10.0.2.15 (la machine virtuelle) et l’uid était 1000. Tout comme pour les routes, vous ne pouvez pas simplement rejoindre la N1 et aller tout droit au supermarché. Le supermarché se trouve peut-être dans Cherry Lane. Pour aller à Cherry Lane, il faut tourner à droite à Trent Road (n’essayez pas, c’est de la fiction). C’est la même chose pour le trafic IP. Pour arriver à la 1.1.1.1 sur Cherry Lane, je dois tourner à droite à 10.0.2.2. C’est la route que prendra le trafic IP. Si vous avez plus d’un réseau, vous pouvez prétendre être un agent de la circulation et vous pouvez choisir |
**Consider the next replacement (bottom left). | **Consider the next replacement (bottom left). | ||
Ligne 31: | Ligne 31: | ||
In this case, the n’s are not the same. In the newer ip command, n is the shortest I can make neighbour. In the old way, the n stood for numeric. It is not needed for our example, but I wanted you to see the difference (just typing arp would imply –vn). Since the ‘new’ way is a lot like IOS, you could type ip ne, or ip nei, and the command will still work. The same syntax happens here, you can type ip nei add 192.168.1.250..... (you would need the MAC address or link-layer address aka lladdr, etc… too much detail for a n00b, just know it can be done). Because this is possible, it is also possible for an attacker to add their own ‘neighbour’ here, known as arp cache poisoning. These are reasons you never use root, unlike Windows – where people use Administrator and don’t learn. And just like that, in two issues, your understanding of the ip command doubled.** | In this case, the n’s are not the same. In the newer ip command, n is the shortest I can make neighbour. In the old way, the n stood for numeric. It is not needed for our example, but I wanted you to see the difference (just typing arp would imply –vn). Since the ‘new’ way is a lot like IOS, you could type ip ne, or ip nei, and the command will still work. The same syntax happens here, you can type ip nei add 192.168.1.250..... (you would need the MAC address or link-layer address aka lladdr, etc… too much detail for a n00b, just know it can be done). Because this is possible, it is also possible for an attacker to add their own ‘neighbour’ here, known as arp cache poisoning. These are reasons you never use root, unlike Windows – where people use Administrator and don’t learn. And just like that, in two issues, your understanding of the ip command doubled.** | ||
- | Regardez le prochain remplacement (en bas à gauche | + | Regardez le prochain remplacement (en bas à gauche). |
- | Dans ce cas, les « n » ne sont pas les mêmes. Dans la commande ip plus récente, « n » est l’abréviation la plus courte que je peux faire de « neighbour » (voisin). Par le passé, le « n » était pour numérique. On n’en a pas besoin pour l’exemple, | + | Dans ce cas, les « n » ne sont pas les mêmes. Dans la commande ip la plus récente, « n » est l’abréviation la plus courte que je peux faire de « neighbour » (voisin). Par le passé, le « n » était pour numérique. On n’en a pas besoin pour l’exemple, |
**To understand all the twists and turns your computer packets make, I wanted you to type traceroute www.google.co.uk in your terminal, but that is also not available in 22.04, so I will cover that in another issue. :) The Linux landscape is changing, and you need to change with it, I suppose. I should have planned this better, but I see it as an opportunity to write about another funky tool soon! | **To understand all the twists and turns your computer packets make, I wanted you to type traceroute www.google.co.uk in your terminal, but that is also not available in 22.04, so I will cover that in another issue. :) The Linux landscape is changing, and you need to change with it, I suppose. I should have planned this better, but I see it as an opportunity to write about another funky tool soon! | ||
Ligne 39: | Ligne 39: | ||
As always, send recipes to misc@fullcirclemagazine.org** | As always, send recipes to misc@fullcirclemagazine.org** | ||
- | Pour comprendre le voyage compliqué que font les paquets de votre ordinateur, je voulais vous faire taper « traceroot www.google.co.uk » dans votre terminal, mais cela aussi n’est pas disponible dans la 22.04 et je le traiterai dans un autre numéro.:) Le paysage de Linux change et vous devez changer avec, je suppose. J’aurais dû mieux planifier cet article, mais je le vois comme l’occasion d’écrire bientôt au sujet d’un autre outil funky. | + | Pour comprendre le voyage compliqué que font les paquets de votre ordinateur, je voulais vous faire taper « traceroot www.google.co.uk » dans votre terminal, mais cela aussi n’est pas disponible dans la 22.04 et je le traiterai dans un autre numéro. :) Le paysage de Linux change et vous devez changer avec, je suppose. J’aurais dû mieux planifier cet article, mais je le vois comme l’occasion d’écrire bientôt au sujet d’un autre outil, funky. |
Comme toujours, envoyez vos recettes à misc@fullcirclemagazine.org | Comme toujours, envoyez vos recettes à misc@fullcirclemagazine.org | ||
issue193/c_c.1685345928.txt.gz · Dernière modification : 2023/05/29 09:38 de auntiee