aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-10-24 09:13:27 -0400
committerLibravatar netblue30 <netblue30@protonmail.com>2023-10-24 09:13:27 -0400
commitfa075b62fb010267e7b9eda8264b596d94d66aab (patch)
tree70770c7df31ff84f0f02890515eea562f84d8988 /src
parentbuild(deps): bump github/codeql-action from 2.22.3 to 2.22.4 (diff)
downloadfirejail-fa075b62fb010267e7b9eda8264b596d94d66aab.tar.gz
firejail-fa075b62fb010267e7b9eda8264b596d94d66aab.tar.zst
firejail-fa075b62fb010267e7b9eda8264b596d94d66aab.zip
enabled nettraces by default in the main build - you would need to be root to run these optionslandlock-split
Diffstat (limited to 'src')
-rw-r--r--src/firejail/main.c4
-rw-r--r--src/fnettrace/main.c10
-rw-r--r--src/fnettrace/static-ip-map.txt41
-rw-r--r--src/man/firejail.1.in20
4 files changed, 47 insertions, 28 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c
index e3dab561c..0c9c80137 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -420,7 +420,6 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
420 exit_err_feature("x11"); 420 exit_err_feature("x11");
421 } 421 }
422#endif 422#endif
423#ifdef HAVE_NETWORK
424 else if (strcmp(argv[i], "--nettrace") == 0) { 423 else if (strcmp(argv[i], "--nettrace") == 0) {
425 if (checkcfg(CFG_NETWORK)) { 424 if (checkcfg(CFG_NETWORK)) {
426 if (getuid() != 0) { 425 if (getuid() != 0) {
@@ -524,8 +523,7 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
524 exit(0); 523 exit(0);
525 } 524 }
526 525
527 526#ifdef HAVE_NETWORK
528
529 else if (strncmp(argv[i], "--bandwidth=", 12) == 0) { 527 else if (strncmp(argv[i], "--bandwidth=", 12) == 0) {
530 if (checkcfg(CFG_NETWORK)) { 528 if (checkcfg(CFG_NETWORK)) {
531 logargs(argc, argv); 529 logargs(argc, argv);
diff --git a/src/fnettrace/main.c b/src/fnettrace/main.c
index 5a0b97e89..4db8e7478 100644
--- a/src/fnettrace/main.c
+++ b/src/fnettrace/main.c
@@ -308,6 +308,8 @@ static inline const char *common_port(uint16_t port) {
308 return "Tor"; 308 return "Tor";
309 else if (port == 9030) 309 else if (port == 9030)
310 return "Tor"; 310 return "Tor";
311 else if (port == 9040)
312 return "Tor";
311 else if (port == 9050) 313 else if (port == 9050)
312 return "Tor"; 314 return "Tor";
313 else if (port == 9051) 315 else if (port == 9051)
@@ -506,16 +508,16 @@ static void print_stats(FILE *fp) {
506 508
507 fprintf(fp, "\n\nIP map"); 509 fprintf(fp, "\n\nIP map");
508 if (fp == stdout) 510 if (fp == stdout)
509 ansi_faint(" - server-address network (packets)\n"); 511 ansi_faint(" - network (packets)\n");
510 else 512 else
511 fprintf(fp, " - server-address network (packets)\n"); 513 fprintf(fp, " - network (packets)\n");
512 radix_print(fp, 1); 514 radix_print(fp, 1);
513 515
514 fprintf(fp, "\n\nEvents %d", ev_cnt); 516 fprintf(fp, "\n\nEvents %d", ev_cnt);
515 if (fp == stdout) 517 if (fp == stdout)
516 ansi_faint(" - time address:port data\n"); 518 ansi_faint(" - time address data\n");
517 else 519 else
518 fprintf(fp, " - time address:port data\n"); 520 fprintf(fp, " - time address data\n");
519 ev_print(fp); 521 ev_print(fp);
520 522
521} 523}
diff --git a/src/fnettrace/static-ip-map.txt b/src/fnettrace/static-ip-map.txt
index 3e857b200..aeac58c6a 100644
--- a/src/fnettrace/static-ip-map.txt
+++ b/src/fnettrace/static-ip-map.txt
@@ -188,6 +188,7 @@
188104.244.40.0/21 Twitter 188104.244.40.0/21 Twitter
189108.160.160.0/20 Dropbox 189108.160.160.0/20 Dropbox
190108.175.32.0/20 Netflix 190108.175.32.0/20 Netflix
191129.144.0.0/12 Oracle
191129.134.0.0/16 Facebook 192129.134.0.0/16 Facebook
192140.82.112.0/20 GitHub 193140.82.112.0/20 GitHub
193143.55.64.0/20 GitHub 194143.55.64.0/20 GitHub
@@ -221,7 +222,6 @@
221185.125.188.0/22 Ubuntu One 222185.125.188.0/22 Ubuntu One
222185.199.108.0/22 GitHub 223185.199.108.0/22 GitHub
223185.205.69.0/24 Tutanota 224185.205.69.0/24 Tutanota
224185.238.113.0/24 Bitchute
225188.64.224.0/21 Twitter 225188.64.224.0/21 Twitter
226190.217.33.0/24 Steam 226190.217.33.0/24 Steam
227192.0.64.0/18 Wordpress 227192.0.64.0/18 Wordpress
@@ -253,7 +253,11 @@
25363.141.247.168/29 BitChute 25363.141.247.168/29 BitChute
25463.141.247.240/29 BitChute 25463.141.247.240/29 BitChute
25569.30.200.200/29 BitChute 25569.30.200.200/29 BitChute
25669.30.230.64/29 BitChute
25769.30.241.40/29 BitChute
25669.30.241.48/29 BitChute 25869.30.241.48/29 BitChute
25969.30.243.168/29 BitChute
26069.30.245.232/29 BitChute
25769.30.253.16/29 BitChute 26169.30.253.16/29 BitChute
25869.197.182.184/29 BitChute 26269.197.182.184/29 BitChute
25974.91.28.208/29 BitChute 26374.91.28.208/29 BitChute
@@ -264,6 +268,7 @@
264107.150.45.120/29 BitChute 268107.150.45.120/29 BitChute
265142.54.180.104/29 BitChute 269142.54.180.104/29 BitChute
266142.54.181.184/29 BitChute 270142.54.181.184/29 BitChute
271142.54.188.112/29 BitChute
267142.54.189.192/29 BitChute 272142.54.189.192/29 BitChute
268173.208.154.8/29 BitChute 273173.208.154.8/29 BitChute
269173.208.154.160/29 BitChute 274173.208.154.160/29 BitChute
@@ -275,19 +280,27 @@
275173.208.216.40/29 BitChute 280173.208.216.40/29 BitChute
276173.208.219.112/29 BitChute 281173.208.219.112/29 BitChute
277173.208.246.160/29 BitChute 282173.208.246.160/29 BitChute
283185.238.113.0/24 BitChute
284192.151.147.16/29 BitChute
278192.151.158.136/29 BitChute 285192.151.158.136/29 BitChute
279192.187.97.88/29 BitChute 286192.187.97.88/29 BitChute
280192.187.114.16/29 BitChute 287192.187.114.16/29 BitChute
281192.187.114.96/29 BitChute 288192.187.114.96/29 BitChute
289192.187.118.168/29 BitChute
290192.187.121.208/29 BitChute
282192.187.123.112/29 BitChute 291192.187.123.112/29 BitChute
283192.187.126.0/29 BitChute 292192.187.126.0/29 BitChute
284198.204.226.120/29 BitChute 293198.204.226.120/29 BitChute
285198.204.228.48/29 BitChute 294198.204.228.48/29 BitChute
295198.204.235.88/29 BitChute
286198.204.235.216/29 BitChute 296198.204.235.216/29 BitChute
287198.204.245.32/29 BitChute 297198.204.245.32/29 BitChute
288198.204.245.88/29 BitChute 298198.204.245.88/29 BitChute
289198.204.250.208/29 BitChute 299198.204.250.208/29 BitChute
300198.204.253.64/29 BitChute
301198.204.253.184/29 BitChute
290199.168.96.24/29 BitChute 302199.168.96.24/29 BitChute
303199.168.96.64/29 BitChute
291204.12.220.136/29 BitChute 304204.12.220.136/29 BitChute
292204.12.194.176/29 BitChute 305204.12.194.176/29 BitChute
293204.12.194.248/29 BitChute 306204.12.194.248/29 BitChute
@@ -297,7 +310,7 @@
297# WholeSale Internet 310# WholeSale Internet
29869.30.192.0/18 WholeSale Internet 31169.30.192.0/18 WholeSale Internet
29969.197.128.0/18 WholeSale Internet 31269.197.128.0/18 WholeSale Internet
300 313142.54.160.0/19 WholeSale Internet
301173.208.128.0/17 WholeSale Internet 314173.208.128.0/17 WholeSale Internet
302204.12.192.0/18 WholeSale Internet 315204.12.192.0/18 WholeSale Internet
303208.67.0.0/21 WholeSale Internet 316208.67.0.0/21 WholeSale Internet
@@ -625,6 +638,7 @@
625206.190.32.0/19 Yahoo 638206.190.32.0/19 Yahoo
626209.73.160.0/19 Yahoo 639209.73.160.0/19 Yahoo
627209.191.64.0/18 Yahoo 640209.191.64.0/18 Yahoo
641212.82.100.0/22 Yahoo
628216.115.96.0/20 Yahoo 642216.115.96.0/20 Yahoo
629 643
630# Google 644# Google
@@ -634,6 +648,18 @@
6348.35.192.0/20 Google 6488.35.192.0/20 Google
63523.236.48.0/20 Google 64923.236.48.0/20 Google
63623.251.128.0/19 Google 65023.251.128.0/19 Google
65134.4.16.0/20 Google
65234.4.64.0/18 Google
65334.4.6.0/23 Google
65434.16.0.0/12 Google
65534.32.0.0/11 Google
65634.4.128.0/17 Google
65734.8.0.0/13 Google
65834.4.8.0/21 Google
65934.5.0.0/16 Google
66034.6.0.0/15 Google
66134.4.32.0/19 Google
66234.4.5.0/24 Google
63734.64.0.0/10 Google 66334.64.0.0/10 Google
63834.128.0.0/10 Google 66434.128.0.0/10 Google
63935.184.0.0/13 Google 66535.184.0.0/13 Google
@@ -1884,6 +1910,7 @@
188434.192.0.0/12 Amazon 191034.192.0.0/12 Amazon
188534.208.0.0/12 Amazon 191134.208.0.0/12 Amazon
188634.224.0.0/12 Amazon 191234.224.0.0/12 Amazon
191334.225.127.72/10 Amazon
188734.240.0.0/13 Amazon 191434.240.0.0/13 Amazon
188834.248.0.0/13 Amazon 191534.248.0.0/13 Amazon
188935.71.64.0/22 Amazon 191635.71.64.0/22 Amazon
@@ -3432,7 +3459,7 @@
343254.93.0.0/16 Amazon 345954.93.0.0/16 Amazon
343354.94.0.0/16 Amazon 346054.94.0.0/16 Amazon
343454.95.0.0/16 Amazon 346154.95.0.0/16 Amazon
343554.144.0.0/14 Amazon 346254.144.0.0/12 Amazon
343654.148.0.0/15 Amazon 346354.148.0.0/15 Amazon
343754.150.0.0/16 Amazon 346454.150.0.0/16 Amazon
343854.151.0.0/17 Amazon 346554.151.0.0/17 Amazon
@@ -3443,7 +3470,7 @@
344354.154.0.0/16 Amazon 347054.154.0.0/16 Amazon
344454.155.0.0/16 Amazon 347154.155.0.0/16 Amazon
344554.156.0.0/14 Amazon 347254.156.0.0/14 Amazon
344654.160.0.0/13 Amazon 347354.160.0.0/11 Amazon
344754.168.0.0/16 Amazon 347454.168.0.0/16 Amazon
344854.169.0.0/16 Amazon 347554.169.0.0/16 Amazon
344954.170.0.0/15 Amazon 347654.170.0.0/15 Amazon
@@ -3456,7 +3483,7 @@
345654.182.0.0/16 Amazon 348354.182.0.0/16 Amazon
345754.183.0.0/16 Amazon 348454.183.0.0/16 Amazon
345854.184.0.0/13 Amazon 348554.184.0.0/13 Amazon
345954.192.0.0/16 Amazon 348654.192.0.0/12 Amazon
346054.193.0.0/16 Amazon 348754.193.0.0/16 Amazon
346154.194.0.0/15 Amazon 348854.194.0.0/15 Amazon
346254.196.0.0/15 Amazon 348954.196.0.0/15 Amazon
@@ -3467,12 +3494,12 @@
346754.204.0.0/15 Amazon 349454.204.0.0/15 Amazon
346854.206.0.0/16 Amazon 349554.206.0.0/16 Amazon
346954.207.0.0/16 Amazon 349654.207.0.0/16 Amazon
347054.208.0.0/15 Amazon 349754.208.0.0/13 Amazon
347154.210.0.0/15 Amazon 349854.210.0.0/15 Amazon
347254.212.0.0/15 Amazon 349954.212.0.0/15 Amazon
347354.214.0.0/16 Amazon 350054.214.0.0/16 Amazon
347454.215.0.0/16 Amazon 350154.215.0.0/16 Amazon
347554.216.0.0/15 Amazon 350254.216.0.0/14 Amazon
347654.218.0.0/16 Amazon 350354.218.0.0/16 Amazon
347754.219.0.0/16 Amazon 350454.219.0.0/16 Amazon
347854.220.0.0/16 Amazon 350554.220.0.0/16 Amazon
diff --git a/src/man/firejail.1.in b/src/man/firejail.1.in
index ee4adf5b8..06969e851 100644
--- a/src/man/firejail.1.in
+++ b/src/man/firejail.1.in
@@ -788,7 +788,6 @@ $ firejail \-\-list
788.br 788.br
789$ firejail \-\-dns.print=3272 789$ firejail \-\-dns.print=3272
790 790
791#ifdef HAVE_NETWORK
792.TP 791.TP
793\fB\-\-dnstrace[=name|pid] 792\fB\-\-dnstrace[=name|pid]
794Monitor DNS queries. The sandbox can be specified by name or pid. Only networked sandboxes 793Monitor DNS queries. The sandbox can be specified by name or pid. Only networked sandboxes
@@ -828,7 +827,6 @@ $ sudo firejail --dnstrace
828.br 827.br
82911:32:08 9.9.9.9 www.youtube.com (type 1) 82811:32:08 9.9.9.9 www.youtube.com (type 1)
830.br 829.br
831#endif
832 830
833.TP 831.TP
834\fB\-\-env=name=value 832\fB\-\-env=name=value
@@ -930,7 +928,6 @@ $ firejail --ignore=seccomp --ignore=caps firefox
930$ firejail \-\-ignore="net eth0" firefox 928$ firejail \-\-ignore="net eth0" firefox
931#endif 929#endif
932 930
933#ifdef HAVE_NETWORK
934.TP 931.TP
935\fB\-\-icmptrace[=name|pid] 932\fB\-\-icmptrace[=name|pid]
936Monitor ICMP traffic. The sandbox can be specified by name or pid. Only networked sandboxes 933Monitor ICMP traffic. The sandbox can be specified by name or pid. Only networked sandboxes
@@ -956,7 +953,6 @@ $ sudo firejail --icmptrace
956.br 953.br
95720:53:55 192.168.1.60 -> 1.1.1.1 - 154 bytes - Destination unreachable/Port unreachable 95420:53:55 192.168.1.60 -> 1.1.1.1 - 154 bytes - Destination unreachable/Port unreachable
958.br 955.br
959#endif
960 956
961.TP 957.TP
962\fB\-\-\include=file.profile 958\fB\-\-\include=file.profile
@@ -1643,6 +1639,7 @@ PID User RX(KB/s) TX(KB/s) Command
16431294 netblue 53.355 1.473 firejail \-\-net=eth0 firefox 16391294 netblue 53.355 1.473 firejail \-\-net=eth0 firefox
1644.br 1640.br
16457383 netblue 9.045 0.112 firejail \-\-net=eth0 transmission 16417383 netblue 9.045 0.112 firejail \-\-net=eth0 transmission
1642#endif
1646.TP 1643.TP
1647\fB\-\-nettrace[=name|pid] 1644\fB\-\-nettrace[=name|pid]
1648Monitor received TCP. UDP, and ICMP traffic. The sandbox can be specified by name or pid. Only networked sandboxes 1645Monitor received TCP. UDP, and ICMP traffic. The sandbox can be specified by name or pid. Only networked sandboxes
@@ -1658,17 +1655,15 @@ Example:
1658.br 1655.br
1659$ sudo firejail --nettrace 1656$ sudo firejail --nettrace
1660.br 1657.br
1661 95 KB/s geoip 457, IP database 4436 1658 93 KB/s address:port (protocol) network
1662.br 1659.br
1663 52 KB/s *********** 64.222.84.207:443 United States 1660 14 B/s ** 104.24.8.4:443(QUIC) Cloudflare
1664.br 1661.br
1665 33 KB/s ******* 89.147.74.105:63930 Hungary 1662 80 KB/s ***************** 192.187.97.90:443(TLS) BitChute
1666.br 1663.br
1667 0 B/s 45.90.28.0:443 NextDNS 1664 1 B/s 149.56.228.45:443(DoH) Canada
1668.br 1665.br
1669 0 B/s 94.70.122.176:52309(UDP) Greece 1666(D)isplay, (S)ave, (C)lear, e(X)it
1670.br
1671 339 B/s 104.26.7.35:443 Cloudflare
1672.br 1667.br
1673 1668
1674.br 1669.br
@@ -1677,7 +1672,6 @@ the country the traffic originates from is added to the trace.
1677We also use the static IP map in /usr/lib/firejail/static-ip-map 1672We also use the static IP map in /usr/lib/firejail/static-ip-map
1678to print the domain names for some of the more common websites and cloud platforms. 1673to print the domain names for some of the more common websites and cloud platforms.
1679No external services are contacted for reverse IP lookup. 1674No external services are contacted for reverse IP lookup.
1680#endif
1681.TP 1675.TP
1682\fB\-\-nice=value 1676\fB\-\-nice=value
1683Set nice value for all processes running inside the sandbox. 1677Set nice value for all processes running inside the sandbox.
@@ -2862,7 +2856,6 @@ $ firejail \-\-list
2862.br 2856.br
2863$ firejail \-\-shutdown=3272 2857$ firejail \-\-shutdown=3272
2864 2858
2865#ifdef HAVE_NETWORK
2866.TP 2859.TP
2867\fB\-\-snitrace[=name|pid] 2860\fB\-\-snitrace[=name|pid]
2868Monitor Server Name Indication (TLS/SNI). The sandbox can be specified by name or pid. Only networked sandboxes 2861Monitor Server Name Indication (TLS/SNI). The sandbox can be specified by name or pid. Only networked sandboxes
@@ -2904,7 +2897,6 @@ $ sudo firejail --snitrace
2904.br 2897.br
290507:53:11 192.0.73.2 1.gravatar.com 289807:53:11 192.0.73.2 1.gravatar.com
2906.br 2899.br
2907#endif
2908 2900
2909.TP 2901.TP
2910\fB\-\-tab 2902\fB\-\-tab