1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>The ipv6calc Homepage</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="AEN2"
>The ipv6calc Homepage</A
></H1
><H3
CLASS="AUTHOR"
><A
NAME="AEN4"
>Peter Bieringer</A
></H3
><DIV
CLASS="AFFILIATION"
><DIV
CLASS="ADDRESS"
><P
CLASS="ADDRESS"
>pb at bieringer dot de</P
></DIV
></DIV
><DIV
CLASS="REVHISTORY"
><TABLE
WIDTH="100%"
BORDER="0"
><TR
><TH
ALIGN="LEFT"
VALIGN="TOP"
COLSPAN="3"
><B
>Revision History</B
></TH
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 11.0.0</TD
><TD
ALIGN="LEFT"
>2021-10-03</TD
><TD
ALIGN="LEFT"
>Revised by: PB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
></TD
></TR
></TABLE
></DIV
><HR></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>1. <A
HREF="#AEN14"
>General</A
></DT
><DD
><DL
><DT
>1.1. <A
HREF="#AEN20"
>Latest version</A
></DT
><DT
>1.2. <A
HREF="#AEN23"
>Included programs</A
></DT
><DT
>1.3. <A
HREF="#AEN38"
>Included databases</A
></DT
><DT
>1.4. <A
HREF="#AEN52"
>Possible external databases</A
></DT
></DL
></DD
><DT
>2. <A
HREF="#AEN95"
>License</A
></DT
><DT
>3. <A
HREF="#AEN98"
>Copyright</A
></DT
><DT
>4. <A
HREF="#AEN101"
>Author</A
></DT
><DT
>5. <A
HREF="#AEN108"
>Where to get sources or binaries</A
></DT
><DD
><DL
><DT
>5.1. <A
HREF="#AEN110"
>Latest version of sources</A
></DT
><DT
>5.2. <A
HREF="#AEN116"
>Releases</A
></DT
><DT
>5.3. <A
HREF="#AEN148"
>Ready to use packages for several operating systems:</A
></DT
></DL
></DD
><DT
>6. <A
HREF="#AEN211"
>Configuring & Compiling</A
></DT
><DD
><DL
><DT
>6.1. <A
HREF="#AEN213"
>Configuring</A
></DT
><DT
>6.2. <A
HREF="#AEN217"
>Compiling</A
></DT
><DT
>6.3. <A
HREF="#AEN225"
>Configuring & Compiling with Presets</A
></DT
></DL
></DD
><DT
>7. <A
HREF="#AEN229"
>Mailling Lists</A
></DT
><DD
><DL
><DT
>7.1. <A
HREF="#AEN231"
>ipv6calc-announce</A
></DT
><DT
>7.2. <A
HREF="#AEN251"
>ipv6calc</A
></DT
></DL
></DD
><DT
>8. <A
HREF="#AEN271"
>Bug Reports</A
></DT
><DT
>9. <A
HREF="#AEN274"
>Features of ipv6calc</A
></DT
><DD
><DL
><DT
>9.1. <A
HREF="#AEN276"
>Description</A
></DT
><DT
>9.2. <A
HREF="#AEN279"
>List of built-in features</A
></DT
><DT
>9.3. <A
HREF="#AEN288"
>Examples</A
></DT
><DT
>9.4. <A
HREF="#AEN356"
>Option style</A
></DT
><DT
>9.5. <A
HREF="#AEN368"
>Online help</A
></DT
></DL
></DD
><DT
>10. <A
HREF="#AEN487"
>Webserver log conversion helper program "ipv6logconv"</A
></DT
><DD
><DL
><DT
>10.1. <A
HREF="#AEN490"
>Supported options</A
></DT
><DT
>10.2. <A
HREF="#AEN493"
>Examples</A
></DT
><DT
>10.3. <A
HREF="#AEN497"
>Usage</A
></DT
></DL
></DD
><DT
>11. <A
HREF="#AEN502"
>Webserver log anonymization helper program "ipv6loganon"</A
></DT
><DD
><DL
><DT
>11.1. <A
HREF="#AEN507"
>Anonymization details</A
></DT
><DT
>11.2. <A
HREF="#AEN559"
>Supported log file formats</A
></DT
><DT
>11.3. <A
HREF="#AEN566"
>Supported options</A
></DT
><DT
>11.4. <A
HREF="#AEN569"
>Usage</A
></DT
></DL
></DD
><DT
>12. <A
HREF="#AEN590"
>External database update helper scripts</A
></DT
><DD
><DL
><DT
>12.1. <A
HREF="#AEN593"
>IP2Location</A
></DT
><DT
>12.2. <A
HREF="#AEN596"
>GeoIP</A
></DT
><DT
>12.3. <A
HREF="#AEN600"
>DB-IP.com</A
></DT
><DT
>12.4. <A
HREF="#AEN604"
>External</A
></DT
></DL
></DD
><DT
>13. <A
HREF="#AEN607"
>Perl CGI wrapper program "ipv6calcweb.cgi"</A
></DT
><DD
><DL
><DT
>13.1. <A
HREF="#AEN610"
>Examples</A
></DT
></DL
></DD
><DT
>14. <A
HREF="#AEN623"
>Webserver log statistics helper program "ipv6logstats"</A
></DT
><DD
><DL
><DT
>14.1. <A
HREF="#AEN627"
>Supported options</A
></DT
><DT
>14.2. <A
HREF="#AEN630"
>Usage</A
></DT
><DT
>14.3. <A
HREF="#AEN664"
>Examples</A
></DT
></DL
></DD
><DT
>15. <A
HREF="#AEN668"
>Apache web server module “mod_ipv6calc”</A
></DT
><DD
><DL
><DT
>15.1. <A
HREF="#AEN694"
>Installation</A
></DT
><DT
>15.2. <A
HREF="#AEN698"
>Configuration</A
></DT
><DT
>15.3. <A
HREF="#AEN710"
>Result</A
></DT
><DT
>15.4. <A
HREF="#AEN714"
>Post-analysis in case of anonymization method “keep-type-asn-cc”</A
></DT
></DL
></DD
><DT
>16. <A
HREF="#AEN718"
>History</A
></DT
><DD
><DL
><DT
>16.1. <A
HREF="#AEN721"
>2021</A
></DT
><DT
>16.2. <A
HREF="#AEN730"
>2020</A
></DT
><DT
>16.3. <A
HREF="#AEN737"
>2019</A
></DT
><DT
>16.4. <A
HREF="#AEN752"
>2017</A
></DT
><DT
>16.5. <A
HREF="#AEN762"
>2016</A
></DT
><DT
>16.6. <A
HREF="#AEN767"
>2015</A
></DT
><DT
>16.7. <A
HREF="#AEN782"
>2014</A
></DT
><DT
>16.8. <A
HREF="#AEN787"
>2013</A
></DT
><DT
>16.9. <A
HREF="#AEN796"
>2011</A
></DT
><DT
>16.10. <A
HREF="#AEN813"
>2002-2010</A
></DT
><DT
>16.11. <A
HREF="#AEN817"
>2001</A
></DT
></DL
></DD
></DL
></DIV
><DIV
CLASS="SECT1"
><H2
CLASS="SECT1"
><A
NAME="AEN14"
>1. General</A
></H2
><P
>ipv6calc is a small utility written in programming language C to manipulate (not only) IPv6 addresses and is able to do other tricky things. Intentions were convering a given IPv6 address into compressed format, convering a given IPv6 address into the same format like shown in /proc/net/if_inet6 and (because it was not difficulty) migrating the Perl program ip6_int into. Now only one utiltity is needed to do a lot.</P
><P
>This utility was also used in the past to extend features on network-functions-ipv6 library, used by initscripts-ipv6.</P
><P
>Note: this tool got also its <A
HREF="http://freecode.com/projects/ipv6calc/"
TARGET="_top"
>freecode.com (former freshmeat, now also EOL) / ipv6calc</A
> page (but this is not maintained by the author)</P
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN20"
>1.1. Latest version</A
></H3
><P
>Latest version since last update of this page is 4.0.0</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN23"
>1.2. Included programs</A
></H3
><P
></P
><UL
><LI
><P
>“ipv6calc”: the main utility</P
></LI
><LI
><P
>“ipv6calcweb”: CGI wrapper for ipv6calc's address information output</P
></LI
><LI
><P
>“ipv6logconv”: log converter (IPv4/IPv6)</P
></LI
><LI
><P
>“ipv6loganon”: log anonymizer (IPv4/IPv6)</P
></LI
><LI
><P
>“ipv6logstats”: log statistic generator (IPv4/IPv6)</P
></LI
><LI
><P
>“mod_ipv6calc”: Apache module</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN38"
>1.3. Included databases</A
></H3
><P
>If not disabled during compiling of the tool, following databases are statically included, since version 0.95.0 internally mentioned as “BuiltIn”:</P
><P
></P
><UL
><LI
><P
>IEEE IAB, OUI, OUI-28, OUI-36 databases (for decoding vendor part of MAC/EUI-48/EUI-64)</P
></LI
><LI
><P
>IPv4 assignment databases from IANA, ARIN, RIPENCC, APNIC, LACNIC, AFRINIC (for selecting proper registry in ipv6calcweb.cgi and IPv4 anonymization)</P
></LI
><LI
><P
>IPv6 assignment databases from IANA, ARIN, RIPENCC, APNIC, LACNIC, AFRINIC (for selecting proper registry in ipv6calcweb.cgi and IPv6 anonymization)</P
></LI
><LI
><P
>ASN assignment databases from IANA, ARIN, RIPENCC, APNIC, LACNIC, AFRINIC (for IPv4/IPv6 anonymization)</P
></LI
><LI
><P
>LISP assignment database for supplying extra info</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN52"
>1.4. Possible external databases</A
></H3
><P
>If enabled during compiling the tool, following external (but local stored) databases can be used</P
><P
></P
><UL
><LI
><P
><A
HREF="http://www.maxmind.com/"
TARGET="_top"
>GeoIP</A
></P
><P
></P
><UL
><LI
><P
>IPv4 “legacy” (since 0.61.0, released 2006 until 3.0.0 released 2020)</P
></LI
><LI
><P
>IPv6 “legacy” (since 0.90.0, released 2011, req. GeoIP >= 1.4.5 until 3.0.0 released 2020)</P
></LI
><LI
><P
>GeoIP2 (native MaxMindDB file support since 2.0.0, release 2019)</P
></LI
></UL
></LI
><LI
><P
><A
HREF="http://www.ip2location.com/"
TARGET="_top"
>IP2Location</A
></P
><P
></P
><UL
><LI
><P
>IPv4 (since 0.60.0, released 2006)</P
></LI
><LI
><P
>IPv6 (since 0.70.0, released 2007, <A
HREF="http://lite.ip2location.com/"
TARGET="_top"
>IP2Location LITE IPv6 Databases</A
> since 0.99.0, released 2015)</P
></LI
><LI
><P
>release 0.99.0 is tested against IP2Location >= 4.0.2</P
></LI
><LI
><P
>release >= 2.0.0 && < 3.0.0 is only working with IP2Location >= 7.0.1</P
></LI
><LI
><P
>release >= 3.0.0 is only working with IP2Location >= 8.2.0</P
></LI
></UL
></LI
><LI
><P
><A
HREF="http://www.db-ip.com/"
TARGET="_top"
>DB-IP.com</A
></P
><P
></P
><UL
><LI
><P
>(since 0.98.0, released 2015 until 3.0.0 released 2020) based on local Berkeley DB files generated from downloaded CSV files</P
></LI
><LI
><P
>native MaxMindDB files (support since 2.0.0, released 2019)</P
></LI
></UL
></LI
><LI
><P
>“External” (since 0.98.0, released 2015), based on local Berkeley DB files, generated from downloaded TXT/XML files (registries assignment databases). Supporting IPv4/IPv6 to Registries and IPv4/IPv6 to CountryCode. If newer, overruling the related included databases.</P
></LI
></UL
><P
>Since version 0.95.0 the tool can be compiled to use dynamically loading of library, means the binaries can be also used on systems where IP2Location or GeoIP libraries are not existing. On such system, the support is simply disabled then and some capabilities/features which requires the databases are disabled.</P
><P
>Since version 0.97.4 also fallback code for GeoIP and IP2Location is included in the source package, means that support of dynamically loading of library can be included during compilation without having related development sources on the system.</P
><P
>Since version 2.0.0 MaxMindDB is supported (linked or dynamically loaded)</P
><P
>Since version 3.0.0 GeoIP(legacy) and db-ip.com(BerkeleyDB) is remoed</P
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN95"
>2. License</A
></H2
><P
>The program is published under the GNU GPL version 2.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN98"
>3. Copyright</A
></H2
><P
>(C) 2001 - 2021 by Dr. Peter Bieringer</P
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN101"
>4. Author</A
></H2
><P
>The author of ipv6calc is</P
><P
></P
><UL
><LI
><P
><A
HREF="mailto:pb@bieringer.de"
TARGET="_top"
>Dr. Peter Bieringer</A
> with some minor contribution by others</P
></LI
></UL
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN108"
>5. Where to get sources or binaries</A
></H2
><DIV
CLASS="SECT2"
><H3
CLASS="SECT2"
><A
NAME="AEN110"
>5.1. Latest version of sources</A
></H3
><P
></P
><UL
><LI
><P
>Via GitHub (since 2016-09-05) at <A
HREF="https://github.com/pbiering/ipv6calc"
TARGET="_top"
>GitHub / ipv6calc</A
></P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN116"
>5.2. Releases</A
></H3
><DIV
CLASS="SECT3"
><H4
CLASS="SECT3"
><A
NAME="AEN118"
>5.2.1. as tar.gz or zip</A
></H4
><P
></P
><UL
><LI
><P
>via HTTPS at <A
HREF="https://github.com/pbiering/ipv6calc/releases"
TARGET="_top"
>GitHub / ipv6calc / releases</A
> </P
></LI
></UL
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN124"
>5.2.2. as tar.gz (signed)</A
></H4
><P
></P
><UL
><LI
><P
>from <A
HREF="http://www.deepspace6.net/"
TARGET="_top"
>DeepSpace6</A
> via FTP <A
HREF="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/"
TARGET="_top"
>DeepSpace6 / anonymous FTP</A
> or HTTP <A
HREF="http://www.deepspace6.net/ftp/pub/ds6/sources/ipv6calc/"
TARGET="_top"
>www.deepspace6.net mapped FTP</A
></P
></LI
><LI
><P
>via <A
HREF="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/"
TARGET="_top"
>ftp.bieringer.de / anonymous FTP</A
> or HTTP at <A
HREF="http://www.bieringer.de/ftp/pub/linux/IPv6/ipv6calc/"
TARGET="_top"
>www.bieringer.de mapped FTP</A
></P
></LI
></UL
><P
>Since version 0.95.0 packages are signed with new GPG key, also available here: <A
HREF="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/CODE-GPG-KEY-bieringer.de-2013"
TARGET="_top"
>CODE-GPG-KEY-bieringer.de-2013 @ftp.bieringer.de</A
> or <A
HREF="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/CODE-GPG-KEY-bieringer.de-2013"
TARGET="_top"
>CODE-GPG-KEY-bieringer.de-2013 @ftp.deepspace6.net</A
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Key fingerprint: AAB3 8CB7 97C7 50C7 78C6 08C6 DDEB 141D F738 0F61
uid: Peter Bieringer (Code Signing Key 2013) <code@bieringer.de></PRE
></FONT
></TD
></TR
></TABLE
><P
>A SPEC file is included, so you can build a RPM from tar.gz using</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ rpmbuild -ta path/to/ipv6calc-$version.tar.gz</PRE
></FONT
></TD
></TR
></TABLE
><P
>In addition, conditional build options are available (see related configure options below):</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>--without ip2location
--without mmdb (which disables GeoIP v2 and db-ip.com v2)
--without external
--without shared
--without mod_ipv6calc</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN144"
>5.2.3. as RPM</A
></H4
><P
>Can be searched via <A
HREF="http://www.rpmfind.net/linux/rpm2html/search.php?query=ipv6calc"
TARGET="_top"
>rpmfind / ipv6calc</A
>.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN148"
>5.3. Ready to use packages for several operating systems:</A
></H3
><DIV
CLASS="SECT3"
><H4
CLASS="SECT3"
><A
NAME="AEN150"
>5.3.1. Fedora Linux</A
></H4
><P
>Fedora 29 is the current developing platform, so use given hints above to create a RPM. Since Fedora 7 this package is included by default.</P
><P
>See also <A
HREF="https://src.fedoraproject.org/rpms/ipv6calc"
TARGET="_top"
>FedoraProject / Packages / ipv6calc</A
></P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN155"
>5.3.2. Red Hat Enterprise Linux and clones</A
></H4
><P
>It's tested by the developer that creation of the RPM is working fine starting with RHEL 4.</P
><P
></P
><UL
><LI
><P
>Major version 5 has the package included by default (but a rather old version)</P
><P
></P
><UL
><LI
><P
>RPMs of newer releases are available as test builds on koji, see related URL in announcements <A
HREF="https://lists.deepspace6.net/pipermail/ipv6calc-announce/"
TARGET="_top"
>ipv6calc-announce / list archive</A
></P
></LI
><LI
><P
>*** Untested since version 2.0.0 because OS is out of support ***</P
></LI
></UL
></LI
><LI
><P
>Major version 6: available since September 2014 on <A
HREF="https://fedoraproject.org/wiki/EPEL"
TARGET="_top"
>FedoraProject / EPEL</A
>, see also <A
HREF="https://src.fedoraproject.org/rpms/ipv6calc"
TARGET="_top"
>FedoraProject / Packages / ipv6calc</A
></P
><P
></P
><UL
><LI
><P
>*** Untested since version 3.0.1 because OS is out of support ***</P
></LI
></UL
></LI
><LI
><P
>Major version 7: available since Decenber 2016 on <A
HREF="https://fedoraproject.org/wiki/EPEL"
TARGET="_top"
>FedoraProject / EPEL</A
>, see also <A
HREF="https://src.fedoraproject.org/rpms/ipv6calc"
TARGET="_top"
>FedoraProject / Packages / ipv6calc</A
></P
></LI
><LI
><P
>Major version 8: available since September 2019 on <A
HREF="https://fedoraproject.org/wiki/EPEL"
TARGET="_top"
>FedoraProject / EPEL</A
>, see also <A
HREF="https://src.fedoraproject.org/rpms/ipv6calc"
TARGET="_top"
>FedoraProject / Packages / ipv6calc</A
></P
></LI
></UL
><P
>CentOS 7 and Rocky 8 are also platforms for regression tests.</P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN183"
>5.3.3. Gentoo/Funtoo</A
></H4
><P
>Package is maintained, nevertheless, Funtoo is used as platform for regression tests.</P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN186"
>5.3.4. Ubuntu</A
></H4
><P
>Package is maintained, more information can be found at <A
HREF="https://packages.ubuntu.com/ipv6calc"
TARGET="_top"
>https://packages.ubuntu.com/ipv6calc</A
></P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN190"
>5.3.5. Debian GNU/Linux</A
></H4
><P
>Package is maintained, more information can be found at <A
HREF="http://packages.debian.org/ipv6calc"
TARGET="_top"
>http://packages.debian.org/ipv6calc</A
></P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN194"
>5.3.6. openSUSE</A
></H4
><P
>Package is maintained, more information can be found at <A
HREF="http://download.opensuse.org/repositories/home:/uebelhacker/"
TARGET="_top"
>http://download.opensuse.org/repositories/home:/uebelhacker/</A
></P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN198"
>5.3.7. NetBSD</A
></H4
><P
>See here for more: <A
HREF="ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/net/ipv6calc/README.html"
TARGET="_top"
>ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/net/ipv6calc/README.html</A
></P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN202"
>5.3.8. FreeBSD</A
></H4
><P
>See here for more: <A
HREF="http://www.freshports.org/net-mgmt/ipv6calc/"
TARGET="_top"
>http://www.freshports.org/net-mgmt/ipv6calc/</A
> (<A
HREF="http://www.freebsd.org/cgi/query-pr.cgi?pr=34441"
TARGET="_top"
>http://www.freebsd.org/cgi/query-pr.cgi?pr=34441</A
>)</P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN207"
>5.3.9. OpenBSD</A
></H4
><P
>See here for more: <A
HREF="http://www.openbsd.org/cgi-bin/cvsweb/ports/net/ipv6calc/"
TARGET="_top"
>http://www.openbsd.org/cgi-bin/cvsweb/ports/net/ipv6calc/</A
></P
></DIV
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN211"
>6. Configuring & Compiling</A
></H2
><DIV
CLASS="SECT2"
><H3
CLASS="SECT2"
><A
NAME="AEN213"
>6.1. Configuring</A
></H3
><P
>Following “ipc6calc” related configure options are currently supported (note: disabling the internal databases reduces the size of the resulting binaries/shared library a lot):</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>--disable-dynamic-load Disable dynamic load of libraries (default: enabled)
--disable-db-ieee Disable build-in IEEE database (default: enabled)
--disable-db-ipv4 Disable build-in IPv4 database (default: enabled)
--disable-db-ipv6 Disable build-in IPv6 database (default: enabled)
--disable-db-as-registry Disable built-in AS-to-Registry database (default: enabled)
--disable-db-cc-registry Disable built-in CountryCode-to-Registry database (default: enabled)
--disable-geoip2 Disable MaxMindDB support for GeoIP (default: enabled)
--disable-dbip2 Disable MaxMindDB support for db-ip.com (default: enabled)
--enable-mmdb Enable MaxMindDB support (GeoIP/db-ip.com) (default: disabled)
--enable-external Enable external db support (default: disabled)
--enable-ip2location Enable IP2Location support (default: disabled)
--enable-mod_ipv6calc Enable build of mod_ipv6calc for Apache (default: disabled)
--with-mmdb-dynamic Enable use of dynamic loading of MaxMindDB library (default=no)
--with-mmdb-headers=DIR MaxMindDB include files location
--with-mmdb-lib=DIR MaxMindDB library location
--with-mmdb-dyn-lib=NAME Use specified MaxMindDB dynamic library, default: libmaxminddb.so.0
--with-ip2location-headers=DIR IP2Location include files location
--with-ip2location-headers-fallback IP2Location include files from internal fallback location (only usable with dynamic load option)
--with-ip2location-lib=FILE IP2Location library location
--with-ip2location-static Explicitly link IP2Location statically (default=no)
--with-ip2location-dynamic Enable use of dynamic loading of IP2Location library (default=no)
--with-ip2location-db=DIR Use specified IP2Location database directory, default: /usr/share/IP2Location
--with-ip2location-dyn-lib=NAME Use specified IP2Location dynamic library, default: libIP2Location.so
--with-geoip-db=DIR Use specified GeoIP database directory, default: /usr/share/GeoIP
--with-dbip-db=DIR Use specified db-ip.com database directory, default: /usr/share/DBIP
--with-external-db=DIR Use specified external database directory, default: /usr/share/ipv6calc/db
--with-apxs=NAME name of the apxs executable (apxs)
--enable-shared Enable shared library build (default: disabled)
--enable-bundled-getopt Enable bundled getopt library (default: autoselected)
--enable-bundled-md5 Enable bundled MD5 library (default: autoselected)</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN217"
>6.2. Compiling</A
></H3
><P
>As usual, use</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ make</PRE
></FONT
></TD
></TR
></TABLE
><P
>and run tests afterwards using</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ make test</PRE
></FONT
></TD
></TR
></TABLE
><P
>or at least (e.g. if external databases are not available)</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ make test-minimal</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN225"
>6.3. Configuring & Compiling with Presets</A
></H3
><P
>A shell script is included which can configure and compile with standard presets (also used during regression tests):</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ./autogen.sh -h
Supported options:
-?|-h|--help : this help
-n|--no-make : stop before running 'make'
-a|--all : enable GeoIP/IP2Location/db-ip.com/External/mod_ipv6calc support
-A|--ALL : enable GeoIP/IP2Location/db-ip.com/External/mod_ipv6calc support with dynamic library support
-m|--mmdb : enable MaxMindDB support (GeoIP/db-ip.com)
--mmdb-dyn|-M : switch to dynamic library loading of MaxMindDB
--disable-geoip2 : disable MaxMindDB support for GeoIP
--disable-dbip2 : disable MaxMindDB support for db-ip.com
-i|--ip2location : enable IP2Location support
--ip2location-dyn|-I: switch to dynamic library loading of IP2Location
-e|--external : enable external database support
--disable-db-ieee : disable built-in IEEE database
--disable-db-ipv4 : disable built-in IPv4 database
--disable-db-ipv6 : disable built-in IPv6 database
-S : enable shared library mode
--no-static-build : skip static build
--no-test : skip 'make test'
--clang : use 'clang' instead of default (usually 'gcc')
--m32 : compile for 32-bit
--relax : don't stop on compiler warnings</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN229"
>7. Mailling Lists</A
></H2
><DIV
CLASS="SECT2"
><H3
CLASS="SECT2"
><A
NAME="AEN231"
>7.1. ipv6calc-announce</A
></H3
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Reason:</DT
><DD
><P
>sending announcements of new versions</P
></DD
><DT
>Traffic:</DT
><DD
><P
>very low</P
></DD
><DT
>Postings:</DT
><DD
><P
>only moderators are allowed to post</P
></DD
><DT
>Information:</DT
><DD
><P
><A
HREF="http://lists.deepspace6.net/listinfo/ipv6calc-announce"
TARGET="_top"
>DeepSpace6 / maillist ipv6calc-announce</A
></P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN251"
>7.2. ipv6calc</A
></H3
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Reason:</DT
><DD
><P
>discussions</P
></DD
><DT
>Traffic:</DT
><DD
><P
>low</P
></DD
><DT
>Postings:</DT
><DD
><P
>subscribers</P
></DD
><DT
>Information:</DT
><DD
><P
><A
HREF="http://lists.deepspace6.net/listinfo/ipv6calc"
TARGET="_top"
>DeepSpace6 / maillist ipv6calc</A
></P
></DD
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN271"
>8. Bug Reports</A
></H2
><P
>You can send bug reports to the author himself or subscribe to maillist “ipv6calc” and send it to the list.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN274"
>9. Features of ipv6calc</A
></H2
><DIV
CLASS="SECT2"
><H3
CLASS="SECT2"
><A
NAME="AEN276"
>9.1. Description</A
></H3
><P
>The main program named “ipv6calc” is able to recognize many (not only) IPv6 address formats and depending on a selectable action (not required) a selectable output format can be specified. Also it has the capability to show detailed information of an IPv4/IPv6 address or anonymize it.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN279"
>9.2. List of built-in features</A
></H3
><P
>Option “-v” shows built-in features, depending on configuration before compiling:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -v
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID</PRE
></FONT
></TD
></TR
></TABLE
><P
>Option “-v -v” (since 0.91.0) shows built-in features and capabilities in detail, depending on configuration before compiling:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -vv
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
Capabilities: GeoIP2(linked/MaxMindDB) IP2Location(linked) DBIP2(linked/MaxMindDB) ExternalDatabase DB_AS_REG(BuiltIn) DB_CC_REG(BuiltIn) DB_IPV4_REG(BuiltIn) DB_IPV6_REG(BuiltIn) DB_IEEE(BuiltIn)
Internal main library version: 3.0.0 API: 3.0.0 (built-in)
Internal database library version: 3.0.0 API: 3.0.0 (built-in)
Compiled: Oct 13 2020 19:38:16
MaxMindDB for GeoIP2/DBIP2 support enabled
MaxMindDB dynamic library version (on this system): 1.4.2
GeoIP2 (MaxMindDB) support enabled
GeoIP2 available databases: Country4=1 Country6=1 ASN4=1 ASN6=1 City4=1 City6=1
IP2Location support enabled, compiled with API version: 8.2.0, dynamically linked with version: API=8.2.0 Major=8
IP2Location available databases: Country4=1 Country6=1 ASN4=0 ASN6=0 City4=1 City6=1
DBIP2 (MaxMindDB) support enabled
DBIP2 available databases: Country4=1 Country6=1 ASN4=1 ASN6=1 City4=1 City6=1
External available databases: Country4=1 Country6=1 IPV4_REG=1 IPV6_REG=1
BuiltIn databases available: ASN_REG=1 IPV4_REG=1 IPV6_REG=1 IEEE=1 CC_REG=1
DB features: 0xff07ffff
GeoIP(MaxMindDB): features available/implemented: 0x03063ff0/0x03063ff0 (100%)
GeoIP2: info of available databases in directory: /usr/share/GeoIP
GeoIP2: IPv4/v6 CountryCode (FREE) : [1] GeoLite2-Country.mmdb (GeoLite2-Country Copyright (c) 2019 MaxMind All Rights Reserved, created: 20191217-195954 UTC)
GeoIP2: IPv4/v6 City (FREE) : [2] GeoLite2-City.mmdb (GeoLite2-City Copyright (c) 2019 MaxMind All Rights Reserved, created: 20191217-200126 UTC)
GeoIP2: IPv4/v6 ASN (FREE) : [3] GeoLite2-ASN.mmdb (GeoLite2-ASN Copyright (c) 2019 MaxMind All Rights Reserved, created: 20190122-114228 UTC)
GeoIP2: detected best databases FREE Country4=2 Country6=2 City4=2 City6=2
GeoIP2: detected best databases COMM Country4=0 Country6=0 City4=0 City6=0
GeoIP2: selected best databases normal Country4=2 Country6=2 City4=2 City6=2
GeoIP2: selected best databases method: COMM older than 12 months are deselected in case of FREE is available
GeoIP2: selected best databases method: COMM/FREE with more features are only selected in case not older than 1 months of already found COMM/FREE
IP2Location: features available/implemented: 0x0c003fc0/0x0c003fc0 (100%)
IP2Location: info of available databases in directory: /usr/share/IP2Location
IP2Location: Copyright (c) IP2Location All Rights Reserved
IP2Location: IPv4 Country :[ 49] IP-COUNTRY-SAMPLE.BIN (IP2L-DB1 IPv4 IPv6 SAMPLE 20201005)
IP2Location: IPv4 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo :[ 68] IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-SAMPLE.BIN (IP2L-DB20 IPv4 IPv6 SAMPLE 20190129)
IP2Location: IPv4 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo/El/Us:[ 72] IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-SAMPLE.BIN (IP2L-DB24 IPv4 IPv6 SAMPLE 20190129)
IP2Location: IPv6 Country :[ 73] IPV6-COUNTRY.SAMPLE.BIN (IP2L-DB1 IPv4 IPv6 SAMPLE 20201005)
IP2Location: IPv6 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo :[ 92] IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE.SAMPLE.BIN (IP2L-DB20 IPv4 IPv6 SAMPLE 20171128)
IP2Location: IPv6 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo/El/Us:[ 96] IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE.SAMPLE.BIN (IP2L-DB24 IPv4 IPv6 SAMPLE 20171128)
IP2Location: IPvx Co/Re/Ci/LattLong/ZIP/TZ :[ 35] IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE.BIN (IP2L-DB11 IPv4 IPv6 20181226)
IP2Location: detected best databases SAMPLE Country4=49 Country6=73 City4=72 City6=96
IP2Location: detected best databases LITE Country4=0 Country6=0 City4=0 City6=0
IP2Location: detected best databases COMM Country4=35 Country6=35 City4=35 City6=35
IP2Location: selected best databases LI->SA* Country4=0 Country6=0 City4=0 City6=0
IP2Location: selected best databases normal Country4=35 Country6=35 City4=35 City6=35
IP2Location: selected best databases method: * = autoswitch from LITE to SAMPLE enabled in case not older than 12 months and having more features
IP2Location: selected best databases method: COMM older than 12 months are deselected in case of LITE is available
IP2Location: selected best databases method: COMM/LITE/SAMPLE with more features are only selected in case not older than 1 months of already found COMM/LITE/SAMPLE
IP2Location: selected best databases method: softlinks: skipped-by-default
db-ip.com(MaxMindDB): features available/implemented: 0x30063ff0/0x30063ff0 (100%)
DBIP2: info of available databases in directory: /usr/share/DBIP
DBIP2: IPv4/v6 CountryCode (FREE) : [1] dbip-country-lite.mmdb (DBIP-Country-Lite Copyright (c) 2019 db-ip.com All Rights Reserved, created: 20190831-232938 UTC)
DBIP2: IPv4/v6 City (FREE) : [2] dbip-city-lite.mmdb (DBIP-City-Lite Copyright (c) 2019 db-ip.com All Rights Reserved, created: 20190831-233248 UTC)
DBIP2: IPv4/v6 Location+ISP (COMM) : [6] dbip-location-isp.mmdb (DBIP-Location-ISP (compat=Enterprise) Copyright (c) 2019 db-ip.com All Rights Reserved, created: 20190101-015418 UTC)
DBIP2: detected best databases FREE Country4=2 Country6=2 City4=2 City6=2
DBIP2: detected best databases COMM Country4=6 Country6=6 City4=6 City6=6
DBIP2: selected best databases normal Country4=6 Country6=6 City4=6 City6=6
DBIP2: selected best databases method: COMM older than 12 months are deselected in case of FREE is available
DBIP2: selected best databases method: COMM/FREE with more features are only selected in case not older than 1 months of already found COMM/FREE
External: features available/implemented: 0xc00180cc/0xc00180cc (100%)
External: info of available databases in directory: /usr/share/ipv6calc/db
External: IPv4 Registry : ipv6calc-external-ipv4-registry.db (EXTDB-1/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191227 LACNIC/20200903 LISP/20200318 RIPENCC/20200903, created: 20200904-061346 UTC)
External: IPv6 Registry : ipv6calc-external-ipv6-registry.db (EXTDB-2/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191106 LACNIC/20200903 LISP/20200318 RIPENCC/20200903, created: 20200904-063305 UTC)
External: IPv4 CountryCode : ipv6calc-external-ipv4-countrycode.db (EXTDB-3/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191227 LACNIC/20200903 LISP/20200318 RIPENCC/20200903, created: 20200904-061347 UTC)
External: IPv6 CountryCode : ipv6calc-external-ipv6-countrycode.db (EXTDB-4/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191106 LACNIC/20200903 LISP/20200318 RIPENCC/20200903, created: 20200904-063305 UTC)
BuiltIn: features available/implemented: 0x0001c00f/0x0001c00f (100%)
BuiltIn: info of available databases
BuiltIn: ASN : IANA/20200518
BuiltIn: CC : AFRINIC/20201012 APNIC/20201010 ARIN/20201011 LACNIC/20201009 RIPENCC/20201011
BuiltIn: IPv4 : AFRINIC/20201012 APNIC/20201010 ARIN/20201011 IANA/20191227 LACNIC/20201009 LISP/20200318 RIPENCC/20201011 (created: 20201012-064251 UTC)
BuiltIn: IPv6 : AFRINIC/20201012 APNIC/20201010 ARIN/20201011 IANA/20191106 LACNIC/20201009 LISP/20200318 RIPENCC/20201011 (created: 20201012-070210 UTC)
BuiltIn: IEEE : IAB/20201012 OUI/20201012 OUI28/20201012 OUI36/20201012
Database selection or priorization ('->': subsequential calls)
Database priorization default: GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)->GeoIP->db-ip.com->External->BuiltIn
DB_AS_REG (AS-Number to Registry database): BuiltIn
DB_CC_REG (CountryCode to Registry database): BuiltIn
DB_IPV4_REG (IPv4 to Registry database): BuiltIn
DB_IPV6_REG (IPv6 to Registry database): BuiltIn
DB_IPV4_AS (IPv4 to AS database): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)
DB_IPV6_AS (IPv6 to AS database): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)
DB_IPV4_CC (IPv4 to CountryCode database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)->External
DB_IPV6_CC (IPv6 to CountryCode database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)->External
DB_IPV4_COUNTRY (IPv4 to Country database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)
DB_IPV6_COUNTRY (IPv6 to Country database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)
DB_IPV4_CITY (IPv4 to City database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)
DB_IPV6_CITY (IPv6 to City database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)
DB_IPV4_REGION (IPv4 to Region database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)
DB_IPV6_REGION (IPv6 to Region database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB)
DB_IEEE (IEEE/OUI/OUI28/OUI36 Vendor database): BuiltIn
DB_IPV4_INFO (IPv4 additional information): External->BuiltIn
DB_IPV6_INFO (IPv6 additional information): External->BuiltIn
DB_IPV4_GEONAMEID (IPv4 GeonameID): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)
DB_IPV6_GEONAMEID (IPv6 GeonameID): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)</PRE
></FONT
></TD
></TR
></TABLE
><P
>Option “-v -h” (since 0.97.4) shows explanation of feature tokens</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -v -h
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
Explanation of available(x)/possible(o) feature tokens
GeoIP x GeoIPv4 database (provided by GeoIP(MaxMindDB))
GeoIPv6 x GeoIPv6 database (provided by GeoIP(MaxMindDB))
IP2Location x IP2Location IPv4 database (provided by IP2Location)
IP2Location6 x IP2Location IPv6 database (provided by IP2Location)
DBIPv4 x db-ip.com IPv4 database (provided by db-ip.com(MaxMindDB))
DBIPv6 x db-ip.com IPv6 database (provided by db-ip.com(MaxMindDB))
DB_AS_REG x AS-Number to Registry database (provided by BuiltIn)
DB_IPV4_REG x IPv4 to Registry database (provided by External,BuiltIn)
DB_IPV6_REG x IPv6 to Registry database (provided by External,BuiltIn)
DB_IPV4_AS x IPv4 to AS database (provided by GeoIP(MaxMindDB),db-ip.com(MaxMindDB))
DB_IPV6_AS x IPv6 to AS database (provided by GeoIP(MaxMindDB),db-ip.com(MaxMindDB))
DB_IPV4_CC x IPv4 to CountryCode database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB),External)
DB_IPV6_CC x IPv6 to CountryCode database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB),External)
DB_IPV4_COUNTRY x IPv4 to Country database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB))
DB_IPV6_COUNTRY x IPv6 to Country database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB))
DB_IPV4_CITY x IPv4 to City database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB))
DB_IPV6_CITY x IPv6 to City database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB))
DB_IPV4_REGION x IPv4 to Region database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB))
DB_IPV6_REGION x IPv6 to Region database (provided by GeoIP(MaxMindDB),IP2Location,db-ip.com(MaxMindDB))
DB_CC_REG x CountryCode to Registry database (provided by BuiltIn)
DB_IEEE x IEEE/OUI/OUI28/OUI36 Vendor database (provided by BuiltIn)
DB_IPV4_INFO x IPv4 additional information (provided by External,BuiltIn)
DB_IPV6_INFO x IPv6 additional information (provided by External,BuiltIn)
DB_IPV4_GEONAMEID x IPv4 GeonameID (provided by GeoIP(MaxMindDB),db-ip.com(MaxMindDB))
DB_IPV6_GEONAMEID x IPv6 GeonameID (provided by GeoIP(MaxMindDB),db-ip.com(MaxMindDB))
ANON_ZEROISE x Anonymization method 'zeroize'
ANON_ANONYMIZE x Anonymization method 'anonymize'
ANON_KEEP-TYPE-ASN-CC x Anonymization method 'keep-type-asn-cc'
ANON_KEEP-TYPE-GEONAMEID x Anonymization method 'keep-type-geonameid'</PRE
></FONT
></TD
></TR
></TABLE
><P
>Note: since version 0.95.0 the internal layer for database usage was abstracted and each database “plugin” is initialized reporting then its supporting features in binary representation. This makes implementation of other external databases easier in the future. There are at least plans to create an overlay to built-in databases by publishing and use some “precompiled” newer databases replacing the need of recompilation for updated built-in databases.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN288"
>9.3. Examples</A
></H3
><DIV
CLASS="SECT3"
><H4
CLASS="SECT3"
><A
NAME="AEN290"
>9.3.1. Conversion</A
></H4
><P
>A simple example is the conversion of an IPv6 address to a DNS PTR query string:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc --out revnibbles.arpa 2001:db8::1
No input type specified, try autodetection...found type: ipv6addr
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.</PRE
></FONT
></TD
></TR
></TABLE
><P
>Like you see, input format was autodetected. And the given example can be extended because ipv6calc also understands netmask / prefix length values:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q --out revnibbles.arpa 2001:db8::1/64
0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.</PRE
></FONT
></TD
></TR
></TABLE
><P
>Also you've also learnt now that switch '-q' (quiet) suppresses informational messages. You can use this now to start a DNS PTR query using:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ dig PTR `./ipv6calc -q --out revnibbles.arpa 2001:db8::1/64`</PRE
></FONT
></TD
></TR
></TABLE
><P
>But ipv6calc can do many more for you! Next example shows you the extraction of the IPv4 address contained in a 6to4 IPv6 address:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q --action conv6to4 --in ipv6 2002:c0a8:fb61::1 --out ipv4
192.168.251.97</PRE
></FONT
></TD
></TR
></TABLE
><P
>This also works vice-versa:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q --action conv6to4 --in ipv4 192.168.251.97 --out ipv6
2002:c0a8:fb61::</PRE
></FONT
></TD
></TR
></TABLE
><P
>There are many more features already implemented, if you miss one, send a note.</P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN303"
>9.3.2. Information</A
></H4
><P
>Depending on available databases output can vary.</P
><DIV
CLASS="SECT4"
><HR><H5
CLASS="SECT4"
><A
NAME="AEN306"
>9.3.2.1. Information about a simple IPv6 address:</A
></H5
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i 3ffe:ffff::210:a4ff:fe01:2345
Address type: unicast, 6bone, global-unicast, productive
Address type has SLA: 0000
Registry for address: reserved
Interface identifier: 0210:a4ff:fe01:2345
EUI-48/MAC address: 00:10:a4:01:23:45
MAC is a global unique one
MAC is an unicast one
OUI is: XIRCOM</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT4"
><HR><H5
CLASS="SECT4"
><A
NAME="AEN309"
>9.3.2.2. Information about a Teredo IPv6 address:</A
></H5
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i 3ffe:831f:ce49:7601:8000:efff:af4a:86BF
Address type: unicast, 6bone, global-unicast, teredo
Country Code: IT
Registry for address: 6BONE
IPv4 address: 80.181.121.64 (TEREDO-CLIENT)
IPv4 address type: unicast, global
Autonomous System Information for [80.181.121.64]: AS3269 ASN-IBSNAZ
Country Code for [80.181.121.64]: IT
...</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT4"
><HR><H5
CLASS="SECT4"
><A
NAME="AEN312"
>9.3.2.3. Information about a LISP address</A
></H5
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i 153.16.26.80
IPv4 address: 153.16.26.80
IPv4 address type: unicast, global, lisp
...
IPv4 registry: ARIN(LISP#cbc-xtr)
...</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT4"
><HR><H5
CLASS="SECT4"
><A
NAME="AEN315"
>9.3.2.4. Machine readable output</A
></H5
><P
>There exists also a machine readable output (e.g. used by 'ipv6calcweb.cgi') - in addition, database related information can be displayed, if databases are located on the system and supported.</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i -m 2a01:238:423d:8800:85b3:9e6b:3019:8909
IPV6=2a01:0238:423d:8800:85b3:9e6b:3019:8909
IPV6_ANON=a909:16fa:9091:a448:a909:4941:0000:0007
IPV6_TYPE=ipv6,unicast,global-unicast,productive,iid-random,iid,iid-local
IPV6_COUNTRYCODE=DE
IPV6_COUNTRYCODE_SOURCE=GeoIP(MaxMindDB)
IPV6_AS_NUM=6724
IPV6_AS_SOURCE=GeoIP(MaxMindDB)
IPV6_GEONAME_ID=2921044
IPV6_GEONAME_ID_SOURCE=GeoIP(MaxMindDB)
IPV6_GEONAME_ID_TYPE=Country
IPV6_REGISTRY=RIPENCC
SLA=8800
IID=85b3:9e6b:3019:8909
EUI64_SCOPE=local-random
IP2LOCATION_COUNTRY_SHORT=DE
IP2LOCATION_COUNTRY_LONG=Germany
IP2LOCATION_REGION=Berlin
IP2LOCATION_CITY=Berlin
IP2LOCATION_ZIPCODE=10178
IP2LOCATION_LATITUDE=52.524368
IP2LOCATION_LONGITUDE=13.410530
IP2LOCATION_TIMEZONE=+01:00
GEOIP2_CONTINENT_SHORT=EU
GEOIP2_CONTINENT_LONG=Europe
GEOIP2_COUNTRY_SHORT=DE
GEOIP2_COUNTRY_LONG=Germany
GEOIP2_LATITUDE=51.000000
GEOIP2_LONGITUDE=9.000000
GEOIP2_RADIUS=100
GEOIP2_TIMEZONE_NAME=Europe/Berlin
GEOIP2_AS_NUM=6724
GEOIP2_AS_ORGNAME=Strato AG
GEOIP2_GEONAME_ID_COUNTRY=2921044
GEOIP2_GEONAME_ID_CONTINENT=6255148
DBIP2_CONTINENT_SHORT=EU
DBIP2_CONTINENT_LONG=Europe
DBIP2_COUNTRY_SHORT=DE
DBIP2_COUNTRY_LONG=Germany
DBIP2_REGION=Berlin
DBIP2_CITY=Berlin (Charlottenburg-Wilmersdorf)
DBIP2_ZIPCODE=10587
DBIP2_LATITUDE=52.523900
DBIP2_LONGITUDE=13.321400
DBIP2_WEATHERSTATIONCODE=GMXX8538
DBIP2_TIMEZONE_NAME=Europe/Berlin
DBIP2_AS_NUM=6724
DBIP2_AS_ORGNAME=Strato AG
DBIP2_ISP=Strato Rechenzentrum
DBIP2_NETSPEED=Corporate
DBIP2_GEONAME_ID=3336294
DBIP2_GEONAME_ID_REGION=2950157
DBIP2_GEONAME_ID_COUNTRY=2921044
DBIP2_GEONAME_ID_CONTINENT=6255148
EXTERNAL_COUNTRY_SHORT=DE
IP2LOCATION_DATABASE_INFO=IP2L-DB11 IPv4 IPv6 20181226 Copyright (c) 2018 IP2Location All Rights Reserved
GEOIP2_DATABASE_INFO=GeoLite2-City Copyright (c) 2019 MaxMind All Rights Reserved, created: 20191217-200126 UTC / GeoLite2-ASN Copyright (c) 2019 MaxMind All Rights Reserved, created: 20190122-114228 UTC
DBIP2_DATABASE_INFO=DBIP-Location-ISP (compat=Enterprise) Copyright (c) 2019 db-ip.com All Rights Reserved, created: 20190101-015418 UTC
EXTERNAL_DATABASE_INFO=EXTDB-4/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191106 LACNIC/20200903 LISP/20200318 RIPENCC/20200903, created: 20200904-063305 UTC
BUILTIN_DATABASE_INFO=IPv6-REG:AFRINIC/20201012 APNIC/20201010 ARIN/20201011 IANA/20191106 LACNIC/20201009 LISP/20200318 RIPENCC/20201011
IPV6CALC_NAME=ipv6calc
IPV6CALC_VERSION=3.0.0
IPV6CALC_COPYRIGHT="(P) & (C) 2001-2020 by Peter Bieringer <pb (at) bieringer.de>"
IPV6CALC_OUTPUT_VERSION=21
IPV6CALC_SETTINGS_ANON="set=keep-type-asn-cc,mask-ipv6=56,mask-ipv4=24,mask-eui64=40,mask-mac=24,method=keep-type-asn-cc"
IPV6CALC_FEATURES="GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID"
IPV6CALC_CAPABILITIES="GeoIP2(linked/MaxMindDB) IP2Location(linked) DBIP2(linked/MaxMindDB) ExternalDatabase DB_AS_REG(BuiltIn) DB_CC_REG(BuiltIn) DB_IPV4_REG(BuiltIn) DB_IPV6_REG(BuiltIn) DB_IEEE(BuiltIn)"</PRE
></FONT
></TD
></TR
></TABLE
><H5
CLASS="BRIDGEHEAD"
><A
NAME="AEN319"
></A
>Special machine readable output options (>= 0.99.0)</H5
><DIV
CLASS="SECT5"
><HR><H6
CLASS="SECT5"
><A
NAME="AEN320"
>9.3.2.4.1. Output filter by selecting a token (>= 0.99.0)</A
></H6
><P
>Using option --mrst <TOKEN> (Machine Readable Select Token) can be used to display only a selected token</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i --mrst IPV6_TYPE 2a01:238:423d:8800:85b3:9e6b:3019:8909
IPV6_TYPE=unicast,global-unicast,productive,iid-random,iid,iid-local</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT5"
><HR><H6
CLASS="SECT5"
><A
NAME="AEN324"
>9.3.2.4.2. Output filter by matching token (>= 0.99.0)</A
></H6
><P
>Using option --mrmt <TOKEN> (Machine Readable Match Token) can be used to display only matching tokens</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i --mrmt IP2LOCATION 2a01:238:423d:8800:85b3:9e6b:3019:8909
IP2LOCATION_COUNTRY_SHORT=DE
IP2LOCATION_COUNTRY_LONG=Germany
IP2LOCATION_REGION=Berlin
IP2LOCATION_CITY=Berlin
IP2LOCATION_ZIPCODE=10178
IP2LOCATION_LATITUDE=52.524368
IP2LOCATION_LONGITUDE=13.410530
IP2LOCATION_TIMEZONE_NAME=+01:00
IP2LOCATION_DATABASE_INFO=IP2L-DB11 IPv6 20181226 Copyright (c) 2018 IP2Location All Rights Reserved</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT5"
><HR><H6
CLASS="SECT5"
><A
NAME="AEN328"
>9.3.2.4.3. Output filter by selecting a value of a token token (>= 0.99.0)</A
></H6
><P
>Using option --mrtvo <TOKEN> (Machine Readable Token Value Only) can be used to display only thevalue of a selected token</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i --mrtvo IPV6_TYPE 2a01:238:423d:8800:85b3:9e6b:3019:8909
unicast,global-unicast,productive,iid-random,iid,iid-local</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT5"
><HR><H6
CLASS="SECT5"
><A
NAME="AEN332"
>9.3.2.4.4. Output adjustment by unconditional quoting of values (>= 0.99.0)</A
></H6
><P
>Using option --mrqva (Machine Readable Quote Values Always) can be used to quote values always of a selected token</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i --mrqva --mrtvo IPV6_TYPE 2a01:238:423d:8800:85b3:9e6b:3019:8909
"unicast,global-unicast,productive,iid-random,iid,iid-local"</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT5"
><HR><H6
CLASS="SECT5"
><A
NAME="AEN336"
>9.3.2.4.5. Output adjustment by unconditional disabling quoted values (>= 0.99.0)</A
></H6
><P
>Using option --mrqvn (Machine Readable Quote Values Never) can be used to never quote values of a selected token</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i --mrqvn --mrst IPV6_AS_TEXT 2a01:238:423d:8800:85b3:9e6b:3019:8909
IPV6_AS_TEXT=AS6724 STRATO AG</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT5"
><HR><H6
CLASS="SECT5"
><A
NAME="AEN340"
>9.3.2.4.6. Output adjustment by unconditional print token in case of empty value (>= 0.99.0)</A
></H6
><P
>Using option --mrstpq (Machine Readable Select Token Print Always) can be used to print always token/value regardless it's contained</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -i --mrqva --mrstpa IPV4 2a01:238:423d:8800:85b3:9e6b:3019:8909
IPV4=""
$ ipv6calc -q -i --mrqva --mrst IPV4 2a01:238:423d:8800:85b3:9e6b:3019:8909
(no output)</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN344"
>9.3.3. Filter mode</A
></H4
><P
>“ipv6calc” can run in filter mode to be able to extract from a huge list of IPv4/IPv6 addresses ones which are interesting or ones which are not interesting (see printout of online help below).</P
><P
>Filter tokens are the ones which are listed on “TYPE” lines shown in “-m -i” information mode.</P
><P
>Example for searching for Teredo addresses:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ cat ip.bieringer.de-log.201310 | awk '{ print $1 }' | sort | uniq | ipv6calc -A filter -E teredo
2001:0:9d38:90d7:34f7:1a26:8599:e079</PRE
></FONT
></TD
></TR
></TABLE
><P
>For more information see below</P
><P
>Note: since version 0.95.0 '-A filter' is optional if option '-E <filter expression>' is given (autoselected action).</P
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN352"
>9.3.4. Test mode</A
></H4
><P
>Since 0.99.2 a test mode ('-A test', autoselected in case 'test_*' options are given) is implemented for address prefix or range</P
><P
>For more information see below</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN356"
>9.4. Option style</A
></H3
><P
>Since version 0.40 new-style option handling was introduced, using</P
><P
></P
><UL
><LI
><P
>--in <inputtype></P
></LI
><LI
><P
>--out <outputtype></P
></LI
><LI
><P
>--action <actiontype></P
></LI
></UL
><P
>and many more conversions were added. A built-in check matrix should prevent misconversions.</P
><P
>Up to version 0.39, only old-style options (aka “shortcut” options). They are one-in-all options, specifying input/action/output in one token. Internally this options will be converted into new-style options.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN368"
>9.5. Online help</A
></H3
><P
>Online help always shows the currently implemented features.</P
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN371"
>9.5.1. Main online help:</A
></H4
><P
>External database options only appear if compiled with related support.</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -h
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
(P) & (C) 2001-2020 by Peter Bieringer <pb (at) bieringer.de>
This program formats and calculates IPv6/IPv4/MAC addresses and can do many more tricky things
[-d|--debug <debug value>] : debug value (bitwise like)
can also be set by IPV6CALC_DEBUG environment value
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
[-v|--version -h] : explanation of feature tokens
[-V|--verbose] : be more verbose
[-h|--help|-?] : this online help
[--disable-ip2location ] : IP2Location support disabled
[--db-ip2location-disable ] : IP2Location support disabled
[--db-ip2location-dir <directory>] : IP2Location database directory (default: /usr/share/IP2Location)
[--db-ip2location-only-type <TYPE>]: IP2Location database only selected type (1-120)
[--db-ip2location-allow-softlinks] : IP2Location database softlinks allowed
by default they are ignored because it is hard to autodetect COMM/LITE/SAMPLE
[--db-ip2location-lite-to-sample-autoswitch-max-delta-months <MONTHS>]:
autoswitch from LITE to SAMPLE databases if possible and delta is not more than 12 months (0=disabled)
[--db-ip2location-comm-to-lite-switch-min-delta-months <MONTHS>]:
switch from COMM to LITE databases if possible and delta more than 12 months (0=disabled)
[--disable-geoip2 ] : GeoIP(MaxMindDB) support disabled
[--db-geoip2-disable ] : GeoIP(MaxMindDB) support disabled
[--db-geoip2-dir <directory>] : GeoIP(MaxMindDB) database directory (default: /usr/share/GeoIP)
[--disable-dbip2 ] : db-ip.com(MaxMindDB) support disabled
[--db-dbip2-disable ] : db-ip.com(MaxMindDB) support disabled
[--db-dbip2-dir <directory>] : db-ip.com(MaxMindDB) database directory (default: /usr/share/DBIP)
[--db-dbip2-only-type <TYPE>] : db-ip.com(MaxMindDB) database only selected type (1-6)
[--db-dbip2-comm-to-free-switch-min-delta-months <MONTHS>]:
switch from COMM to FREE databases if possible and delta more than 12 months (0=disabled)
[--disable-external ] : External support disabled
[--db-external-disable ] : External support disabled
[--db-external-dir <directory>] : External database directory (default: /usr/share/ipv6calc/db)
[--disable-builtin ] : BuiltIn support disabled
[--db-builtin-disable ] : BuiltIn support disabled
[--db-priorization <entry1>[:...]] : Database priorization order list (overwrites default)
colon separated: GeoIP GeoIP2 IP2Location DBIP DBIP2 External BuiltIn
Hint: all long options can be predefined from environment by using
prefix: IPV6CALC_ and conversion: '-' -> '_' and lowercase -> uppercase
example for options with values : --db-dbip2-dir=<DIR> -> environment: IPV6CALC_DB_DBIP2_DIR=<DIR>
example for options without values: --db-dbip2-disable -> environment: IPV6CALC_DB_DBIP2_DISABLE=1
on|off|0|1 is supported
[-q|--quiet] : be more quiet (auto-enabled in pipe mode)
[-f|--flush] : flush each line in pipe mode
Usage with new style options:
[--in|-I <input type>] : specify input type
(default: autodetect)
[--out|-O <output type>] : specify output type
(sometimes: autodetect)
[--action|-A <action>] : specify action
(default: format conversion, sometimes: autodetect)
[<format option> ...] : specify format options
<input data> [...] : input data
Available input types: [-m] -I|--in -?|-h|--help
Available output types: [-m] -O|--out -?|-h|--help
Available action types: [-m] -A|--action -?|-h|--help
Special filter action : -E -?|-h|--help
Other usage:
--showinfo|-i [--machine_readable|-m] : show information about input data
--showinfo|-i --mrqva : Machine Readable Quote Values Always
--showinfo|-i --mrqvn : Machine Readable Quote Values Never
--showinfo|-i --mrst <TOKEN> : Machine Readable Select Token
--showinfo|-i --mrstpa <TOKEN> : Machine Readable Select Token Print Always
--showinfo|-i --mrmt <TOKENPREFIX> : Machine Readable Match Token Prefix
--showinfo|-i --mrmts <TOKENSUFFIX> : Machine Readable Match Token Suffix
--showinfo|-i --mrtvo <TOKEN> : Machine Readable Token Value Only
--showinfo|-i --show-tokens : show available tokens (aka types) on '-m'
Usage with shortcut options: <shortcut option> [<format option> ...] <input data>
for more information and available format options use: <shortcut option> -?|-h|--help
-r|--addr2ip6_int (-O revnibbles.int)
-r|--addr_to_ip6int (-O revnibbles.int)
-a|--addr2ip6_arpa (-O revnibbles.arpa)
-a|--addr_to_ip6arpa (-O revnibbles.arpa)
-b|--addr_to_bitstring (-O bitstring)
--addr2compaddr (--printcompressed)
--addr_to_compressed (--printcompressed)
--addr2uncompaddr (--printuncompressed)
--addr_to_uncompressed (--printuncompressed)
--addr_to_base85 (-I ipv6addr -O base85)
--base85_to_addr (-I base85 -O ipv6addr)
--mac_to_eui64 (-I mac -O eui64)
--addr2fulluncompaddr (--printfulluncompressed)
--addr_to_fulluncompressed (--printfulluncompressed)
--addr2if_inet6 (-I ipv6addr -O ifinet6)
--addr_to_ifinet6 (-I ipv6addr -O ifinet6)
--if_inet62addr (-I ifinet6 -O ipv6addr --printcompressed)
--ifinet6_to_compressed (-I ifinet6 -O ipv6addr --printcompressed)
--eui64_to_privacy (-I iid_token -O iid_token -A genprivacyiid)
--ipv4_to_6to4addr (-I ipv4 -O ipv6addr -A conv6to4)
--addr2cc (-A addr2cc)</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN375"
>9.5.2. Database options</A
></H4
><P
></P
><UL
><LI
><P
>each internal/external database can be disabled by option</P
></LI
><LI
><P
>directory of database files can be given via related option</P
></LI
><LI
><P
>databases requiring external library the library file can be given in case of dynamic load and linking</P
></LI
><LI
><P
>for geolocation databases specific file can be selected (see --db-<PROVIDER>-only-type <TYPE>)</P
></LI
></UL
><DIV
CLASS="SECT4"
><HR><H5
CLASS="SECT4"
><A
NAME="AEN386"
>9.5.2.1. IP2Location</A
></H5
><P
>IP2location database directory can contain a bunch of files, the best ones are selected automatically (since 0.99.0). “Best” can be controlled via two options:</P
><P
></P
><UL
><LI
><P
>--db-ip2location-lite-to-sample-autoswitch-max-delta-months <MONTHS>: switches from LITE to SAMPLE databases in case of</P
><P
></P
><UL
><LI
><P
>existing SAMPLE database</P
></LI
><LI
><P
>SAMPLE database not older than default/given MONTHS than the LITE database</P
></LI
><LI
><P
>IP address is in range of SAMPLE database (IPv4: 0.0.0.0-99.255.255.255, IPv6: 2a04::/16)</P
></LI
><LI
><P
>autoswitch can be disabled by using MONTHS=0</P
></LI
><LI
><P
>reason for implementation: show maximum possible IP2Location features</P
></LI
></UL
></LI
><LI
><P
>--db-ip2location-comm-to-lite-switch-min-delta-months <MONTHS>: switches from COMMercial to LITE databases in case of</P
><P
></P
><UL
><LI
><P
>existing LITE database</P
></LI
><LI
><P
>COMMercial database is default/given MONTHS older than the LITE database</P
></LI
><LI
><P
>switch can be disabled by using MONTHS=0</P
></LI
><LI
><P
>reason for implementation: avoid using old COMMercial databases</P
></LI
></UL
></LI
><LI
><P
>--db-ip2location-only-type <TYPE>: only selects databases of given type</P
><P
></P
><UL
><LI
><P
>reason for implementation: be able to select a specific database type</P
></LI
></UL
></LI
><LI
><P
>--db-ip2location-allow-softlinks: allow softlinked IP2Location database files</P
><P
></P
><UL
><LI
><P
>by default, softlinked database files are skipped, because it's hard to detect whether one is COMMercial, LITE or SAMPLE</P
></LI
></UL
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
></PRE
></FONT
></TD
></TR
></TABLE
><P
>use “ipv6calc -vv” or “ipv6calc -vvv” for verification, which databases are selected finally.</P
></DIV
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN426"
>9.5.3. Input-type options</A
></H4
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc --in -?
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
(P) & (C) 2001-2019 by Peter Bieringer <pb (at) bieringer.de>
Available input types:
auto : automatic detection
revnibbles.int : dot separated nibbles reverse, ending with ip6.int.
revnibbles.arpa : dot separated nibbles reverse, ending with ip6.arpa.
bitstring : bitstring labes, ending with ip6.arpa.
ipv6addr : IPv6 address
ipv6literal : IPv6 address in literal
ipv4addr : IPv4 address
ipv4hex : IPv4 in hexdecimal format
ipv4revhex : IPv4 in byte-reversed hexdecimal format
mac : MAC address (48 bits)
eui64 : EUI-64 identifier (64 bits)
base85 : Base-85 string
ifinet6 : Like line in /proc/net/if_inet6
iid+token : Interface identifier and token
ipv6logconv : ipv6logconv (currently not supported)
prefix+mac : IPv6 prefix and a MAC address
asn : Autonomous System Number</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN429"
>9.5.4. Output-type options:</A
></H4
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc --out -?
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
(P) & (C) 2001-2019 by Peter Bieringer <pb (at) bieringer.de>
Available output types:
revnibbles.int : dot separated nibbles reverse, ending with ip6.int.
revnibbles.arpa : dot separated nibbles reverse, ending with ip6.arpa.
bitstring : bitstring labes, ending with ip6.arpa.
ipv6addr : IPv6 address
ipv4addr : IPv4 address
mac : MAC address (48 bits)
eui64 : EUI-64 identifier (64 bits)
base85 : Base-85 string
ifinet6 : Like line in /proc/net/if_inet6
iid : Interface identifier
iid+token : Interface identifier and token
addrtype : Address type
ouitype : OUI (IEEE) type
ipv6addrtype : IPv6 address type
any : any type (currently not supported)
revipv4 : reverse IPv4, ending with in-addr.arpa
ipv4hex : IPv4 in hexdecimal format
octal : IP address in escaped octal format
hex : IP address in hexadecimal format
ipv6literal : IPv6 address in literal </PRE
></FONT
></TD
></TR
></TABLE
><P
>For examples and available format options use:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -O|--out <type> --examples</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN434"
>9.5.5. Action-type options:</A
></H4
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc --action -?
ipv6calc: version 3.3.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID DB_IPV4_DUMP_CC DB_IPV6_DUMP_CC ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID (P) & (C) 2001-2021 by Peter Bieringer <pb (at) bieringer.de>
Available action types:
auto : Automatic selection of action (default)
geneui64 : Converts a MAC address to an EUI-64 address
conv6to4 : Converts IPv4 address <-> 6to4 IPv6 address (prefix)
convnat64 : Converts IPv4 address <-> NAT64 IPv6 address
ipv6tomac : Extracts MAC of an IPv6 address (if detected)
ipv6toeui64 : Extracts EUI64 of an IPv6 address (if detected)
genprivacyiid : Generates a privacy interface ID out of a given one (arg1) and a token (arg2)
prefixmac2ipv6 : Generates an IPv6 address out of a prefix and a MAC address
anonymize : Anonymize IPv4/IPv6 address without loosing much information
6rd_local_prefix : Calculate the 6rd prefix from given IPv6 prefix (& relay prefix) and IPv4
Options:
--6rd_prefix ... (required)
--6rd_relay_prefix ... (optional)
6rd_extract_ipv4 : Extract from 6rd address the include IPv4 address
Options:
--6rd_prefixlength ... (required)
filter : Filter addresses related to filter options
test : Test address against given prefix or address
Options:
--test_prefix ... (optional)
--test_gt ... (optional)
--test_ge ... (optional)
--test_lt ... (optional)
--test_le ... (optional)
addr2cc : Converts IPv4/IPv6 address into Country Code
dbdump : Dump Database </PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN437"
>9.5.6. Special action “filter”:</A
></H4
><P
>Special action “filter” can be used especially in pipe mode to filter IP addresses related to their type and since 0.99.0 also related to database results (CountryCode, ASN or Registry).</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc --action filter -h
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
Filter given addresses from stdin by filter expression, e.g.
echo '2001:db8::1' | ipv6calc [-A filter] -E iid-local
echo '2001:db8::1' | ipv6calc [-A filter] -E iid-local,global-unicast
echo '2001:db8::1' | ipv6calc [-A filter] -E ^iid-random
(note: since version 0.95.0 '-A filter' is autoselected if option '-E <filter expression>' is given)
negation of filter expression with prefix: ^
IPv6 address filter tokens:
ipv6 unknown unicast multicast anycast loopback link-local site-local compat-v4 mapped reserved unique-local-unicast anonymized-iid anonymized-prefix 6to4 6bone global-unicast unspecified solicited-node productive 6to4-microsoft teredo orchid link-local-teredo nat64 iid-random iid iid-local iid-global iid-teredo iid-eui48 iid-eui64 iid-isatap iid-includes-ipv4
IPv4 address filter tokens:
ipv4 any unicast multicast anycast broadcast loopback unspecified unknown reserved zeroconf site-local anonymized anonymized-geonameid global 6to4relay lisp lisp-proxyegresstunnelrouter-anycast lisp-mapresolver-anycast
IPv4/v6 address filter tokens based on databases:
[^][ipv4.|ipv6.]db.cc=<CC>|unknown (Country Code [2 chars])
[^][ipv4.|ipv6.]db.asn=<ASN>|unknown (Autonomous System Number)
[^][ipv4.|ipv6.]db.reg=<REGISTRY>
Registry tokens: 6BONE IANA APNIC ARIN RIPENCC LACNIC AFRINIC 6TO4 reserved unknown
IPv4/v6 address filter tokens based on address/mask:
[^]ipv4.addr=<IPV4-ADDRESS>[<PREFIX-LENGTH>]
[^]ipv6.addr=<IPV6-ADDRESS>[<PREFIX-LENGTH>]
IPv4/v6 address filter tokens based on address ranges (<=|<|>|>=):
[^]ipv4.addr(<=|<|>|>=)<IPV4-ADDRESS>
[^]ipv6.addr(<=|<|>|>=)<IPV6-ADDRESS>
as alternative in case <|> creating problems also supported: =(le|lt|gt|ge)=:
[^]ipv4.addr=(le|lt|gt|ge)=<IPV4-ADDRESS>
[^]ipv6.addr=(le|lt|gt|ge)=<IPV6-ADDRESS>
EUI-48/MAC address filter tokens:
IMPLEMENTATION MISSING
EUI-64 address filter tokens:
IMPLEMENTATION MISSING</PRE
></FONT
></TD
></TR
></TABLE
><P
>Example for some filter expressions:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.cc=DE | wc -l
5068
$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.cc=US | wc -l
305
$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.reg=ARIN | wc -l
306
$ cat ip.bieringer.de-log.201504 | ipv6calc -E iid-random | wc -l
4806
$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.cc=US,iid-random | wc -l
16
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E ipv6.db.cc=US,iid-random,ipv4.db.cc=US | wc -l
1842
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E db.asn=8767 | wc -l
2363
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E ipv6.db.asn=8767 | wc -l
1452
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E ipv4.db.asn=8767 | wc -l
911</PRE
></FONT
></TD
></TR
></TABLE
><P
>Example for searching for addresses in a specific range (supported since 0.99.2):</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ cat ip.bieringer.de-log.201609 | awk '{ print $1 }' | sort | uniq | ipv6calc -E ipv6.addr=ge=2002::,ipv6.addr=lt=2003::
2002:2518:0:1:2:3:4:5
...
2002:d950:0:1:2:3:4:5</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN445"
>9.5.7. Special action “test”:</A
></H4
><P
>Special action “test” (since 0.99.2) can be used in command line or pipe mode (single address only) to test IP addresses related to a given prefix or range .</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -A test -?
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
Test given address(es) against supported tests:
--test_prefix <PREFIX> : inside a prefix
--test_gt|--test_ge <ADDRESS>: greater(/equal) than an address
--test_lt|--test_le <ADDRESS>: less(/equal) than an address
Test given address(es) from stdin, e.g.
echo '2001:db8::1' | ipv6calc [-A test] --test_prefix 2001:db8::/32
echo '2001:db8::1' | ipv6calc [-A test] --test_prefix 2001:db9::/32
Single address test, return code: 0=inside/matching 1=outside/not-matching 2=uncomparable
ipv6calc [-A test] --test_prefix 2001:db8::/32 2001:db8::1
ipv6calc [-A test] --test_prefix 2001:db9::/32 2001:db8::1
ipv6calc [-A test] --test_ge 2001:db8:: --test_le 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff 2001:db8::1
ipv6calc [-A test] --test_ge 2001:db9:: --test_le 2001:db9:ffff:ffff:ffff:ffff:ffff:ffff 2001:db8::1
ipv6calc [-A test] --test_ge 2001:db9:: --test_lt 2001:dba:: 2001:db8::1
ipv6calc [-A test] --test_ge 2001:db8:: --test_lt 2001:db9:: 2001:db8::1</PRE
></FONT
></TD
></TR
></TABLE
><P
>Example for command line mode:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc --test_ge 2001:db8:: --test_le 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff 2001:db8::1; echo $?
no input type specified, try autodetection...found type: ipv6addr
no output type specified, try autodetection...found type: ipv6addr
2001:db8::1 greater/equal than 2001:db8:: less/equal than 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff
0</PRE
></FONT
></TD
></TR
></TABLE
><P
>Example for command line mode (quiet):</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q --test_ge 2001:db8:: --test_le 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff 2001:db8::1; echo $?
2001:db8::1 greater/equal than 2001:db8:: less/equal than 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff
0</PRE
></FONT
></TD
></TR
></TABLE
><P
>Example for pipe mode:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ echo -e "1.2.3.4\n1.2.4.4" | ipv6calc --test_prefix 1.2.3.0/24
1.2.3.4 inside 1.2.3.0/24
1.2.4.4 NOT inside 1.2.3.0/24</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN455"
>9.5.8. Special action “conv6to4”:</A
></H4
><P
>Special action “conv6to4” (since at least 0.99.1) can be used in command line or pipe mode to convert 6to4-IPv6 in IPv4 addresses and vice versa.</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc: version 3.2.1 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO ANON_ZEROISE ANON_ANONYMIZE
Convert IPv4 to 6to4 prefix / extract IPv4 from 6to4 prefix
ipv6calc -A conv6to4 192.0.2.1 -> 2002:c000:201::
ipv6calc -A conv6to4 192.0.2.1/24 -> 2002:c000:200::/40
ipv6calc -A conv6to4 192.0.2.0/24 -> 2002:c000:200::/40
ipv6calc -A conv6to4 2002:c000:201:: -> 192.0.2.1
ipv6calc -A conv6to4 2002:c000:201::/40 -> 192.0.2.0/24
See '-O ipv4 -h' or '-O ipv6 -h' for optional output modifications
Can also be used in PIPE mode to convert a list of IP addresses/networks </PRE
></FONT
></TD
></TR
></TABLE
><P
>Example for command line mode:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -A conv6to4 192.0.2.1
2002:c000:201:: </PRE
></FONT
></TD
></TR
></TABLE
><P
>Example for pipe mode:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>echo -e "1.2.3.4\n1.2.4.4" | ipv6calc -A conv6to4
2002:102:304::
2002:102:404::
$ echo -e "1.2.3.0/24\n1.2.4.0/24" | ipv6calc -A conv6to4
2002:102:300::/40
2002:102:400::/40</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN463"
>9.5.9. Special action “dbdump”:</A
></H4
><P
>Since version 3.3.0, action “dbdump” is provided</P
><P
></P
><UL
><LI
><P
>Version >= 3.3.0: database “External”, type: IPv4/IPv6 addresses, suppported filter: CountryCode</P
></LI
></UL
><P
>Precondition: created/updated “External” database</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ /usr/share/ipv6calc/tools/ipv6calc-db-update.sh
...</PRE
></FONT
></TD
></TR
></TABLE
><P
>Precondition: active “database dump” support</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -vv 2>&1 | grep -E '(DB_IPV4_DUMP_CC|DB_IPV6_DUMP_CC)'
ipv6calc: version 3.3.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6 DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION DB_IPV6_REGION DB_CC_REG DB_IEEE DB_IPV4_INFO DB_IPV6_INFO DB_IPV4_GEONAMEID DB_IPV6_GEONAMEID DB_IPV4_DUMP_CC DB_IPV6_DUMP_CC ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
DB_IPV4_DUMP_CC (IPv4 Database Dump by CountryCode): External
DB_IPV6_DUMP_CC (IPv6 Database Dump by CountryCode): External </PRE
></FONT
></TD
></TR
></TABLE
><P
>Precondition: recognized “External” database</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -vv 2>&1 | grep -E '(External: IPv. CountryCode)'
External: IPv4 CountryCode : ipv6calc-external-ipv4-countrycode.db (EXTDB-3/AFRINIC/20210919 APNIC/20210917 ARIN/20210919 IANA/20210205 LACNIC/20210918 LISP/20200318 RIPENCC/20210918, created: 20210919-152957 UTC)
External: IPv6 CountryCode : ipv6calc-external-ipv6-countrycode.db (EXTDB-4/AFRINIC/20210919 APNIC/20210917 ARIN/20210919 IANA/20191106 LACNIC/20210918 LISP/20200318 RIPENCC/20210918, created: 20210919-155049 UTC) </PRE
></FONT
></TD
></TR
></TABLE
><P
>Usage Example: dump all IPv4 networks which have not “unknown” CountryCode</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -A dbdump -E ^ipv4.db.cc=unknown
# 'External' database dump (with 121894 entries) start with filter IPv4 && CountryCode(s): ^unknown (suppress this line with option '-q')
1.0.0.0/24
1.0.1.0/24
...
# 'External' database dump finished displaying 121894 entries with filter IPv4 && CountryCode(s): ^unknown (suppress this line with option '-q') </PRE
></FONT
></TD
></TR
></TABLE
><P
>Usage Example: dump all IPv6 networks of a given CountryCode </P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -A dbdump -E ipv6.db.cc=VN
# 'External' database dump (with 56097 entries) start with filter IPv6 && CountryCode(s): VN (suppress this line with option '-q')
2001:7fa:6::/28
2001:dc8::/28
...
# 'External' database dump finished displaying 344 entries with filter IPv6 && CountryCode(s): VN (suppress this line with option '-q') </PRE
></FONT
></TD
></TR
></TABLE
><P
>Usage Example: dump all IPv4 networks of two given CountryCodes</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -A dbdump -E ipv4.db.cc=VN,ipv4.db.cc=CN
# 'External' database dump (with 121894 entries) start with filter IPv4 && CountryCode(s): VN CN (suppress this line with option '-q')
1.0.1.0/24
1.0.2.0/23
...
# 'External' database dump finished displaying 4631 entries with filter IPv4 && CountryCode(s): VN CN (suppress this line with option '-q') </PRE
></FONT
></TD
></TR
></TABLE
><P
>Usage Example: dump all IPv4 networks of a given CountryCode incl. automatic conversion into 6to4 addresses</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -A dbdump -E ipv4.db.cc=VN -I ipv4 -O ipv6to4
# 'External' database dump (with 121894 entries) start with filter IPv4 && CountryCode(s): VN (output format: 6to4) (suppress this line with option '-q')
2002:134::/30
2002:e00:1000::/36
...
# 'External' database dump finished displaying 569 entries with filter IPv4 && CountryCode(s): VN (output format: 6to4) (suppress this line with option '-q') </PRE
></FONT
></TD
></TR
></TABLE
><P
>Usage Example: dump all IPv6to4 networks of a given CountryCode in “ipset restore” compatible format and create/update “ipset” (related “sudo” command whitelist have to be created in advance)</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -A dbdump -E ipv4.db.cc=VN -I ipv4 -O ipv6to4 -q ---print-ipset Net_VN_IPv6to4 >/path/to/ipset-Net_VN_IPv6to4.txt
$ sudo ipset restore -f /path/to/ipset-Net_VN_IPv6to4.txt
$ sudo ipset list Net_VN_IPv6to4 -t
Name: Net_VN_IPv6to4
Type: hash:net
Revision: 7
Header: family inet6 hashsize 1024 maxelem 65536 bucketsize 12 initval 0x30b0bdaf
Size in memory: 41344
References: 0
Number of entries: 723 </PRE
></FONT
></TD
></TR
></TABLE
><P
>Hint: try also helper script for 'ipset' management</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ tools/ipv6calc-create-update-ipset.sh</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN487"
>10. Webserver log conversion helper program "ipv6logconv"</A
></H2
><P
>This program parses address tokens of a given webserver logfile and converts them to special strings, useful for statistics (e.g. created by using "analog").</P
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN490"
>10.1. Supported options</A
></H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6logconv -h
ipv6logconv: version 2.1.1 CONV_REG CONV_IEEE
(P) & (C) 2002-2019 by Peter Bieringer <pb (at) bieringer.de>
This program converts IPv4/IPv6 addresses in HTTP server log files
[-d|--debug <debug value>] : debug value (bitwise like)
can also be set by IPV6CALC_DEBUG environment value
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
[-v|--version -h] : explanation of feature tokens
[-V|--verbose] : be more verbose
[-h|--help|-?] : this online help
Performance options:
[-n|--nocache] : disable caching
[-c|--cachelimit <value>] : set cache limit
default: 20
maximum: 200
Output options:
[--out <output type>] : specify output type
addrtype : Address type
ouitype : OUI (IEEE) type
ipv6addrtype : IPv6 address type
any : any type
Takes data from stdin, proceed it to stdout</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN493"
>10.2. Examples</A
></H3
><P
>A demonstration about which kind of statistics are possible to produce is shown at <A
HREF="http://www.ipv6.bieringer.de/"
TARGET="_top"
>http://www.ipv6.bieringer.de/</A
> (IPv6 only).</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN497"
>10.3. Usage</A
></H3
><P
>Example:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ echo "2002:50b5:7940:0000:0000:0000:50b5:7940 - -" | ipv6logconv -q --out any
RIPENCC.6to4.global-unicast.ipv6-addr.addrtype.ipv6calc</PRE
></FONT
></TD
></TR
></TABLE
><P
>See more examples inside the package.</P
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN502"
>11. Webserver log anonymization helper program "ipv6loganon"</A
></H2
><P
>On autoconfiguration, the interface part of an IPv6 address is based on the MAC address of the network interface card (NIC). This address is used for outgoing requests, if privacy option (RFC3041 / RFC4941) is not enabled. This results in many privacy related information on web- or mail-server log files. Administrators, which won't (be allowed to) store such information over time, but still do not want to loose information about address type distribution should use 'ipv6loganon' to anonymize their log files.</P
><P
>Since version 0.94.0 internally also IID anonymization is possible without loosing any information for “ipv6logstats”.</P
><P
>Since version 0.95.0 internally also prefix anonymization is possible without loosing any information for “ipv6logstats”.</P
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN507"
>11.1. Anonymization details</A
></H3
><DIV
CLASS="SECT3"
><H4
CLASS="SECT3"
><A
NAME="AEN509"
>11.1.1. Method “zeroize”</A
></H4
><P
>The anonymizer would keep as much information as possible for IPv6 address types.</P
><P
>Client-side IID would be anonymized by</P
><P
></P
><UL
><LI
><P
>EUI-48 based: serial number would be zero'ed, keeping OID</P
></LI
><LI
><P
>EUI-64 based: serial number would be zero'ed, keeping OID</P
></LI
><LI
><P
>ISATAP: client IPv4 address would be anonymized by given IPv4 mask</P
></LI
><LI
><P
>TEREDO: client IPv4 address would be anonymized by given IPv4 mask, client port would be zero'ed</P
></LI
><LI
><P
>6to4(Microsoft): client IPv4 address would be anonymized by given IPv4 mask</P
></LI
><LI
><P
>local: whole IID would be zero'ed</P
></LI
></UL
><P
>Client-side SLA would be anonymized by </P
><P
></P
><UL
><LI
><P
>SLA would be zero'ed</P
></LI
></UL
><P
>Prefix would be anonymized by</P
><P
></P
><UL
><LI
><P
>6to4: client IPv4 address would be anonymized by given IPv4 mask</P
></LI
></UL
><P
>Compat/Mapped IPv4 addresses would be anonymized by</P
><P
></P
><UL
><LI
><P
>IPv4 address would be anonymized by given IPv4 mask</P
></LI
></UL
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN538"
>11.1.2. Method “anonmize”</A
></H4
><P
>The anonymizer would keep as much information as possible for the IID of an IPv6 address.</P
><P
>Description from libipv6addr.h:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> * IID anonymization is done by replacing with related information (64-bit)
* xxxx:xxxx:xxxx:xxxC (C = 4-bit checksum)
*
* a9p9 4941 0000 000C -> RFC 4941 anonymized privacy extension Interface ID
*
* a9p9 4291 4xxx xxxC -> RFC 4291 anonymized EUI-48 Interface ID, xxx xxx = converted OUI
* a9p9 4291 5xxx xxxC -> RFC 4291 anonymized EUI-48 Interface ID, xxx xxx = converted mapped IAB/OUI-36
* a9p9 4291 6xxx xxxC -> RFC 4291 anonymized EUI-64 Interface ID, xxx xxx = converted OUI
* a9p9 4291 7xxx xxxC -> RFC 4291 anonymized EUI-64 Interface ID, xxx xxx = converted mapped IAB/OUI-36
* a9p9 4291 8xxx xxxC -> RFC 4291 embedded anonymized IPv4 address, xxx xxx = first 24 bit of included (anonymized) IPv4 address
* a9p9 4291 c02d 5d1C -> RFC 4291 Chapter 2.5.1 anonymized static Interface ID
*
* a9p9 5214 4xxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx xxx = first 24 bit of included (anonymized) IPv4 address (local scope)
* a9p9 5214 5xxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx xxx = first 24 bit of included (anonymized) IPv4 address (global scope)
* a9p9 5214 cxx0 000C -> RFC 5214 anonymized ISATAP Interface ID, xx = first 8 bit of included vendor ID (local scope)
* a9p9 5214 dxx0 000C -> RFC 5214 anonymized ISATAP Interface ID, xx = first 8 bit of included vendor ID (global scope)
* a9p9 5214 exxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx xxx = first 24 bit of included extension ID (local scope)
* a9p9 5214 fxxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx xxx = first 24 bit of included extension ID (global scope)
*
* a9p9 4843 0000 000C -> RFC 4843 anonymized ORCHID hash</PRE
></FONT
></TD
></TR
></TABLE
><P
>Depending on given mask, the part of the prefix will be replaced:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> * SLA/NLA prefix part anonymization is done by replacing with pattern a909a909
* p = number of nibbles anonymized</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN545"
>11.1.3. Method “keep-type-asn-cc”</A
></H4
><P
>In addition to “anonymize” (of IID) this method anonymizes also the prefix of an IPv6 address or a whole IPv4 address by keeping ASN (Autonomous System Number, Country Code and Type).</P
><P
>Description from libipv6addr.h:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> * Prefix anonymization in case of method=kp: p=0x0f
* a909:ccca:aaaa:aaaC (C = 4-bit checksum)
* ccc -> 10-bit Country Code mapping [A-Z]*[A-Z0-9] (936)
* 0x3FD = LISP
* 0x3FE = unknown country
* 0x3FF - 16 + REGISTRY_6BONE && ASN=0 = 6bone
* 0x000-0x3A7: c1= c / 36, c2 = c % 36
* aaaaaaaa -> 32-bit ASN</PRE
></FONT
></TD
></TR
></TABLE
><P
>Description from libipv4addr.h:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> * Global IPv4 addresses are anoymized by storing country code and AS number
* and using prefix of experimental range (240-255.x.y.z)
*
* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
* 1 1 1 1
* |p p p p|
* Prefix
* 0xF
*
* Pariy Bit (odd parity)
* |P|
*
* Mapping of Country Code
* |c c c c c c c c c c|
* 10-bit Country Code mapping [A-Z]*[A-Z0-9] (936)
* 0x3FF = unknown country
* 0x000-0x3A7: c1= c / 36, c2 = c % 36
*
* Mapping of ASN <= 65535
* 0|a a a a a a a a a a a a a a a a|
* 16-bit ASN
*
* Mapping of ASN >= 65536, ASN & 0xE000 == 0 (12-bit LSB is ok)
* 1|r r r|0|l l l l l l l l l l l l|
* 13-bit LSB of ASN
*
* Mapping of ASN >= 65536, ASN & 0xE000 != 0 (12-bit LSB overflow) => unspecified
* 1|r r r|1|0 0 0 0 0 0 0 0 0 0 0 0|
*
* Mapping of ASN registry for ASN >= 65536
* 0 0 0 = "unknown ASN registry"
* 0 1 0 = APNIC
* 0 1 1 = RIPE
* 1 0 0 = LACNIC
* 1 0 1 = AFRINIC
* 1 1 0 = ARIN
* Mapping of LISP
* 1|r r r|1|1|0 0 0 0 0 0 0 0 0 0 0| </PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN552"
>11.1.4. Method “keep-type-geonameid”</A
></H4
><P
>In difference to keep-type-asn-cc this method anonymizes the prefix of an IPv6 address or a whole IPv4 address by keeping the GeonameID and Type.</P
><P
>Description from libipv6addr.h:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> * a909:sssg:gggg:gggC (C = 4-bit checksum)
* sss -> 10-bit source mapping
* GeonameID source information
* 0x000 = unknown
* 0x001 = continent (prio: lowest)
* 0x002 = country
* 0x003 = state/prov
* 0x004 = district
* 0x005 = city (prio: highest)
* 0x006 = (reserved)
* 0x007 = LISP
* 0x0r. = registry
* -> 2 leftmost bit are |0 1|
* gggggggg -> 32-bit GeonameID
* 0x11800 = LISP</PRE
></FONT
></TD
></TR
></TABLE
><P
>Description from libipv4addr.h:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> * IPv4 address anonymization type "keep-type-geonameid"
* Global IPv4 addresses are anonymized by storing GeonameID
* and using prefix of experimental range (240-255.x.y.z)
*
* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
* 1 1 1 1
* |p p p p|
* Prefix
* 0xF
*
* Parity Bit (even parity)
* |P|
*
* Mapping of GeonameID source
* |s s s|
* 3-bit GeonameID source information
* 0 0 0 (0x0) = unknown
* 0 0 1 (0x1) = continent (prio: lowest)
* 0 1 0 (0x2) = country
* 0 1 1 (0x3) = state/prov
* 1 0 0 (0x4) = district
* 1 0 1 (0x5) = city (prio: highest)
* 1 1 0 (0x6) = (reserved)
* 1 1 1 (0x7) = LISP
*
* Mapping of GeonameID (limited to IDs < 2^24, in worst case ID from source with lower prio is used)
* |g g g g g g g g g g g g g g g g g g g g g g g g|
*
* Mapping of LISP registry
* 0 0 0 = "unknown ASN registry"
* 0 1 0 = APNIC
* 0 1 1 = RIPE
* 1 0 0 = LACNIC
* 1 0 1 = AFRINIC
* 1 1 0 = ARIN
* |0 0 0 0 0 0 0 1 r r r 1 1 0 0 0 0 0 0 0 0 0 0 0|</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN559"
>11.2. Supported log file formats</A
></H3
><P
>Currently native supported log files:</P
><P
></P
><UL
><LI
><P
>Apache log file format, 1st token is IPv4 or IPv6 address</P
></LI
></UL
><P
>There are plans to support also mail server log files sometimes in the future, but because of different formats, this would be probably done by a Perl program which parses the log file and a (cached) 'ip6calc' call with action 'anonymize'.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN566"
>11.3. Supported options</A
></H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6loganon -h
ipv6loganon: version 2.1.1 ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC ANON_KEEP-TYPE-GEONAMEID
(P) & (C) 2007-2019 by Peter Bieringer <pb (at) bieringer.de>
This program anonymizes IPv4/IPv6 addresses in e.g. HTTP server log files
[-d|--debug <debug value>] : debug value (bitwise like)
can also be set by IPV6CALC_DEBUG environment value
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
[-v|--version -h] : explanation of feature tokens
[-V|--verbose] : be more verbose
[-h|--help|-?] : this online help
[-q|--quiet] : be more quiet
[--disable-ip2location ] : IP2Location support disabled
[--db-ip2location-disable ] : IP2Location support disabled
[--db-ip2location-dir <directory>] : IP2Location database directory (default: /usr/share/IP2Location)
[--db-ip2location-lib <file> ] : IP2Location library file (default: libIP2Location.so)
[--db-ip2location-only-type <TYPE>]: IP2Location database only selected type (1-120)
[--db-ip2location-allow-softlinks] : IP2Location database softlinks allowed
by default they are ignored because it is hard to autodetect COMM/LITE/SAMPLE
[--db-ip2location-lite-to-sample-autoswitch-max-delta-months <MONTHS>]:
autoswitch from LITE to SAMPLE databases if possible and delta is not more than 12 months (0=disabled)
[--db-ip2location-comm-to-lite-switch-min-delta-months <MONTHS>]:
switch from COMM to LITE databases if possible and delta more than 12 months (0=disabled)
[--disable-geoip ] : GeoIP support disabled
[--db-geoip-disable ] : GeoIP support disabled
[--db-geoip-dir <directory>] : GeoIP database directory (default: /usr/share/GeoIP)
[--db-geoip-lib <file> ] : GeoIP library file (default: libGeoIP.so.1)
[--db-mmdb-lib <file> ] : MaxMindDB library file (default: libmaxminddb.so.0)
[--disable-geoip2 ] : GeoIP (MaxMindDB) support disabled
[--db-geoip2-disable ] : GeoIP (MaxMindDB) support disabled
[--db-geoip2-dir <directory>] : GeoIP (MaxMindDB) database directory (default: /usr/share/GeoIP)
[--disable-dbip2 ] : db-ip.com (MaxMindDB) support disabled
[--db-dbip2-disable ] : db-ip.com (MaxMindDB) support disabled
[--db-dbip2-dir <directory>] : db-ip.com (MaxMindDB) database directory (default: /usr/share/DBIP)
[--db-dbip2-only-type <TYPE>] : db-ip.com (MaxMindDB) database only selected type (1-10)
[--db-dbip2-comm-to-free-switch-min-delta-months <MONTHS>]:
switch from COMM to FREE databases if possible and delta more than 12 months (0=disabled)
[--disable-dbip ] : db-ip.com support disabled
[--db-dbip-disable ] : db-ip.com support disabled
[--db-dbip-dir <directory>] : db-ip.com database directory (default: /usr/share/DBIP)
[--db-dbip-only-type <TYPE>] : db-ip.com database only selected type (1-10)
[--db-dbip-comm-to-free-switch-min-delta-months <MONTHS>]:
switch from COMM to FREE databases if possible and delta more than 12 months (0=disabled)
[--disable-external ] : External support disabled
[--db-external-disable ] : External support disabled
[--db-external-dir <directory>] : External database directory (default: /usr/share/ipv6calc/db)
[--disable-builtin ] : BuiltIn support disabled
[--db-builtin-disable ] : BuiltIn support disabled
[--db-priorization <entry1>[:...]] : Database priorization order list (overwrites default)
colon separated: GeoIP GeoIP2 IP2Location DBIP DBIP2 External BuiltIn
[-w|--write] : write output to file instead of stdout
[-a|--append] : append output to file instead of stdout
[-f|--flush] : flush output after each line
[-V|--verbose] : be verbose
[-n|--nocache] : disable caching
[-c|--cachelimit <value>] : set cache limit
default: 20
maximum: 200
Shortcut for anonymization presets:
--anonymize-standard (default)
--anonymize-careful
--anonymize-paranoid
Supported methods [--anonymize-method METHOD]:
anonymize : reliable anonymization, keep as much type information as possible
zeroize : simple zeroizing according to given masks, probably loose type information
keep-type-asn-cc: special reliable anonymization, keep type & Autonomous System Number and CountryCode
keep-type-geonameid: special reliable anonymization, keep type & GeonameID
Available presets (shortcut names) [--anonymize-preset|ap PRESET-NAME]:
anonymize-standard (as): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24 mask-autoadjust=yes method=anonymize
anonymize-careful (ac): mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=24 mask-autoadjust=yes method=anonymize
anonymize-paranoid (ap): mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=24 mask-autoadjust=no method=anonymize
zeroize-standard (zs): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24 mask-autoadjust=yes method=zeroize
zeroize-careful (zc): mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=24 mask-autoadjust=yes method=zeroize
zeroize-paranoid (zp): mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=24 mask-autoadjust=no method=zeroize
keep-type-asn-cc (kp): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24 mask-autoadjust=yes method=keep-type-asn-cc
keep-type-geonameid (kg): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24 mask-autoadjust=yes method=keep-type-geonameid
Custom control:
--mask-ipv4 <bits> : mask IPv4 address [0-32] (even if occurs in IPv6 address)
--mask-ipv6 <bits> : mask IPv6 prefix [0-64] (only applied to related address types)
--mask-eui64 <bits> : mask EUI-64 address or IPv6 interface identifier [0-64]
--mask-mac <bits> : mask MAC address [0-48]
--mask-autoadjust yes|no: autoadjust mask to keep type/vendor information regardless of less given mask
Takes data from stdin, outputs the processed data to stdout (default)</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN569"
>11.4. Usage</A
></H3
><DIV
CLASS="SECT3"
><H4
CLASS="SECT3"
><A
NAME="AEN571"
>11.4.1. Offline anonymization</A
></H4
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ cat /path/to/http_log | ./ipv6loganon >/path/to/http_log_anonymized</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN574"
>11.4.2. On-the-fly online anonymization for Apache Webserver</A
></H4
><A
NAME="AEN576"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>Note: since 0.91.1 also a module for Apache Webserver is available (see below) supporting anonymized logging</P
></BLOCKQUOTE
><P
>(Supported since 0.90.0)</P
><P
>Adjust or add (note: more than one CustomLog directive is supported by Apache) httpd.conf like following:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>CustomLog "|/usr/local/bin/ipv6loganon -a -f /var/log/httpd/access_log" combined</PRE
></FONT
></TD
></TR
></TABLE
><P
>In case of “cronolog” is used on the system, configure like this:</P
><P
></P
><UL
><LI
><P
>Apache version < 2.4:</P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>CustomLog "|/usr/bin/ipv6loganon -f |/usr/sbin/cronolog /var/log/httpd/access.log-%Y%m%d" combined </PRE
></FONT
></TD
></TR
></TABLE
><P
></P
><UL
><LI
><P
>Apache version >= 2.4:</P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>CustomLog "|$/usr/bin/ipv6loganon -f |/usr/sbin/cronolog /var/log/httpd/access.log-%Y%m%d" combined </PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN590"
>12. External database update helper scripts</A
></H2
><P
>The “tools” subdirectory contains helper scripts for updating external databases.</P
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN593"
>12.1. IP2Location</A
></H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ /usr/share/ipv6calc/tools/IP2Location-update.sh -h
Usage: IP2Location-update.sh [-D <dir>] [-n] [-s]
-D <dir> database destination directory (optional)
-n no action (dry-run)
-s skip already successfully downloaded files
database directory: /usr/share/IP2Location (default: /usr/share/IP2Location)
it honors externally defined environment value: IP2LOCATION_DAT_DIR
this script will download data from ip2location.com
into given/set database directory
Sample databases:
IP2LOCATION_DAT_FILES_SAMPLE=IPv4:20 IPv6:20 IPv4:24 IPv6:24
Lite (free) databases:
IP2LOCATION_DAT_FILES_LITE_FREE=IPv4:1 IPv6:1
With authentication (requires login/password in /home/compile/.ip2location) and a valid subscription
IP2LOCATION_DAT_FILES_LITE=
Credentials must be defined in $HOME/.ip2location by
login=IP2LOCATION-LOGIN
password=IP2LOCATION-PASSWORD
In addition settings from above can be overwritten by setting related variables</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN596"
>12.2. GeoIP</A
></H3
><P
>Just note that old database format (version 1) is no longer supported for free download, ipv6calc >= 2.0.0 supports also MaxMindDB format, ipv6calc >= 3.0.0 drops legacy download capability</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ /usr/share/ipv6calc/tools/GeoIP-update.sh -h
Usage: GeoIP-update.sh [-D <dir>] [-v] [-s] [-L] [-G]
-s skip download
-D <dir> database directory (optional)
-v verbose
database directory: @GEOIP2_DB@ (default: @GEOIP2_DB@)
it honors externally defined environment value:
prio 1: GEOIP_DAT_DIR
prio 2: IPV6CALC_DB_GEOIP2_DIR
adjust /etc/GeoIP.conf in advance:
EditionIDs GeoLite2-Country GeoLite2-City GeoLite2-ASN
(in case a valid license key exists, add key and extend EditionIDs related)
see also https://dev.maxmind.com/geoip/geoipupdate/</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN600"
>12.3. DB-IP.com</A
></H3
><P
>Since ipv6calc >= 2.0.0 supports also MaxMindDB format, so download of CSV files and converting them into BerkeleyDB format is no longer required.</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ /usr/share/ipv6calc/tools/DBIP-update.sh -h
Usage: DBIP-update.sh [-v] [-s] [-D <dir>] [-U <url>] [-T <type>]
-s skip download
-v verbose
-D <dir> database directory (optional)
-U <url> use URL to download full database
-T <type> set type of via URL downloaded file
MMDB: country|isp|location|*location-isp*
CSV : isp|location|*full*
database directory: /usr/share/DBIP (default: /usr/share/DBIP)
it honors externally defined environment value:
prio 1: DBIP_DAT_DIR
prio 2: IPV6CALC_DB_DBIP2_DIR
this script will download data from
DB-IP.com (default: free versions) the MaxMindDB (mmdb) files DB files for ipv6calc
"DBIP" database support
DBIP_DAT_URL_BASE=http://download.db-ip.com/free/
DBIP_DAT_FILES=dbip-country-lite-%Y-%m.mmdb.gz dbip-city-lite-%Y-%m.mmdb.gz
in case -U <url> (take URL from subscription e-mail) is provided, it downloads the database
use -T <type> in case it's not "location-isp"</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN604"
>12.4. External</A
></H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ /usr/share/ipv6calc/tools/ipv6calc-db-update.sh -h
Usage: ipv6calc-db-update.sh [-s] [-u] [-D <dir>]
-s skip download
-u unconditional update
-D <dir> database directory (optional)
database directory: /usr/share/ipv6calc/db (default: /usr/share/ipv6calc/db)
it honors externally defined environment value: IPV6CALC_DAT_DIR
this script (and its helper scripts) will download data from
registries and generate Berkeley DB files for ipv6calc
"external" database support</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN607"
>13. Perl CGI wrapper program "ipv6calcweb.cgi"</A
></H2
><P
>Because calling C programs directly as CGI isn't really recommended (too much security troubles all the time), I wrote a small wrapper utility which calls "ipv6calc" to get information about client and server address for displaying on a web page. </P
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN610"
>13.1. Examples</A
></H3
><P
>A demonstration about which kind of output is possible to produce is shown at</P
><P
></P
><UL
><LI
><P
><A
HREF="http://ip.bieringer.net/"
TARGET="_top"
>http://ip.bieringer.net/</A
> (IPv4/IPv6)</P
></LI
><LI
><P
><A
HREF="http://www.ipv6.bieringer.de/"
TARGET="_top"
>http://www.ipv6.bieringer.de/</A
> (IPv6 only)</P
></LI
><LI
><P
><A
HREF="http://mirrors.bieringer.de/"
TARGET="_top"
>http://mirrors.bieringer.de/</A
> (IPv4/IPv6)</P
></LI
></UL
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN623"
>14. Webserver log statistics helper program "ipv6logstats"</A
></H2
><P
>This program parses a given webserver logfile and count addresses, useful for time period statistics.</P
><P
>Since version 0.95.0 it has extended output, adding a date/time line and statistics by Country Code and ASN (if required databases are available).</P
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN627"
>14.1. Supported options</A
></H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6logstats -h
ipv6logstats: version 2.1.1 STAT_REG STAT_CC STAT_AS
(P) & (C) 2003-2019 by Peter Bieringer <pb (at) bieringer.de>
Takes web server log data (or any other data which has IPv4/v6 address in first column)
from stdin and print statistics table/list (depending on option) to stdout
[-d|--debug <debug value>] : debug value (bitwise like)
can also be set by IPV6CALC_DEBUG environment value
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
[-v|--version -h] : explanation of feature tokens
[-V|--verbose] : be more verbose
[-h|--help|-?] : this online help
[-q|--quiet] : be more quiet
[--disable-ip2location ] : IP2Location support disabled
[--db-ip2location-disable ] : IP2Location support disabled
[--db-ip2location-dir <directory>] : IP2Location database directory (default: /usr/share/IP2Location)
[--db-ip2location-lib <file> ] : IP2Location library file (default: libIP2Location.so)
[--db-ip2location-only-type <TYPE>]: IP2Location database only selected type (1-120)
[--db-ip2location-allow-softlinks] : IP2Location database softlinks allowed
by default they are ignored because it is hard to autodetect COMM/LITE/SAMPLE
[--db-ip2location-lite-to-sample-autoswitch-max-delta-months <MONTHS>]:
autoswitch from LITE to SAMPLE databases if possible and delta is not more than 12 months (0=disabled)
[--db-ip2location-comm-to-lite-switch-min-delta-months <MONTHS>]:
switch from COMM to LITE databases if possible and delta more than 12 months (0=disabled)
[--disable-geoip ] : GeoIP support disabled
[--db-geoip-disable ] : GeoIP support disabled
[--db-geoip-dir <directory>] : GeoIP database directory (default: /usr/share/GeoIP)
[--db-geoip-lib <file> ] : GeoIP library file (default: libGeoIP.so.1)
[--db-mmdb-lib <file> ] : MaxMindDB library file (default: libmaxminddb.so.0)
[--disable-geoip2 ] : GeoIP (MaxMindDB) support disabled
[--db-geoip2-disable ] : GeoIP (MaxMindDB) support disabled
[--db-geoip2-dir <directory>] : GeoIP (MaxMindDB) database directory (default: /usr/share/GeoIP)
[--disable-dbip2 ] : db-ip.com (MaxMindDB) support disabled
[--db-dbip2-disable ] : db-ip.com (MaxMindDB) support disabled
[--db-dbip2-dir <directory>] : db-ip.com (MaxMindDB) database directory (default: /usr/share/DBIP)
[--db-dbip2-only-type <TYPE>] : db-ip.com (MaxMindDB) database only selected type (1-10)
[--db-dbip2-comm-to-free-switch-min-delta-months <MONTHS>]:
switch from COMM to FREE databases if possible and delta more than 12 months (0=disabled)
[--disable-dbip ] : db-ip.com support disabled
[--db-dbip-disable ] : db-ip.com support disabled
[--db-dbip-dir <directory>] : db-ip.com database directory (default: /usr/share/DBIP)
[--db-dbip-only-type <TYPE>] : db-ip.com database only selected type (1-10)
[--db-dbip-comm-to-free-switch-min-delta-months <MONTHS>]:
switch from COMM to FREE databases if possible and delta more than 12 months (0=disabled)
[--disable-external ] : External support disabled
[--db-external-disable ] : External support disabled
[--db-external-dir <directory>] : External database directory (default: /usr/share/ipv6calc/db)
[--disable-builtin ] : BuiltIn support disabled
[--db-builtin-disable ] : BuiltIn support disabled
[--db-priorization <entry1>[:...]] : Database priorization order list (overwrites default)
colon separated: GeoIP GeoIP2 IP2Location DBIP DBIP2 External BuiltIn
[-u|--unknown] : print unknown IP addresses to stderr
[-c|--columns] : print statistics in columns (1)
[-N|--column-numbers] : print column numbers
[-n|--noheader] : don't print header in columns mode (1)
[-o|--onlyheader] : print only header in columns mode (1)
[-p|--prefix <token>] : print token as prefix (1)
[-s|--simple] : disable extended statistic (CountryCode/ASN)
(1) unsupported for CountryCode & ASN statistics</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN630"
>14.2. Usage</A
></H3
><P
>There are a README and some helper scripts available in the package how to use this program and how to generate a graph using Gnuplot.</P
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN633"
>14.2.1. Line-by-line output</A
></H4
><P
>The example shows output version 3.0, which </P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ zcat ip.bieringer.de-log.201*.gz | ipv6logstats</PRE
></FONT
></TD
></TR
></TABLE
><P
>Header section, since output version 3.0 (>= 0.95.0) additional lines starting with '*3*' and '*DateTime' and '*UnixTime' included</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>*Version 3.0
*DateTime: 2013:11:03 08:57:01+0000 GMT
*UnixTime: 1383469021
*3*DB-Info: DB features: 0x0000133f
*3*DB-Info: GeoIP: features: 0x00000330
*3*DB-Info: GeoIP: info of available databases in directory: /usr/share/GeoIP (max: 31)
*3*DB-Info: GeoIP: GeoIP Country Edition :[ 1] /usr/share/GeoIP/GeoIP.dat (GEO-106FREE 20130903 Build 1 Copyright (c) 2013 MaxMind Inc All Rights Reserved)
*3*DB-Info: GeoIP: GeoIP ASNum Edition :[ 9] /usr/share/GeoIP/GeoIPASNum.dat (GEO-117 20130902 Build 1 Copyright (c) 2013 MaxMind Inc All Rights Reserved)
*3*DB-Info: GeoIP: GeoIP Country V6 Edition :[12] /usr/share/GeoIP/GeoIPv6.dat (GEO-106FREE 20131001 Build 1 Copyright (c) 2013 MaxMind Inc All Rights Reserved)
*3*DB-Info: GeoIP: GeoIP Large Country Edition :[17] /usr/share/GeoIP/GeoIP.dat (GEO-106FREE 20130903 Build 1 Copyright (c) 2013 MaxMind Inc All Rights Reserved)
*3*DB-Info: GeoIP: GeoIP Large Country V6 Edition :[18] /usr/share/GeoIP/GeoIPv6.dat (GEO-106FREE 20131001 Build 1 Copyright (c) 2013 MaxMind Inc All Rights Reserved)
*3*DB-Info: GeoIP: GeoIP ASNum V6 Edition :[21] /usr/share/GeoIP/GeoIPASNumv6.dat (GEO-117 20130306 Build 1 Copyright (c) 2013 MaxMind Inc All Rights Reserved)
*3*DB-Info: IP2Location: features: 0x00000300
*3*DB-Info: IP2Location: info of available databases in directory: /usr/share/IP2Location
*3*DB-Info: IP2Location: IPv4 Country : /usr/share/IP2Location/IP-COUNTRY.BIN (IP2L-DB20 20130411 Copyright (c) 2013 IP2Location All Rights Reserved)
*3*DB-Info: IP2Location: IPv6 Country : /usr/share/IP2Location/IPV6-COUNTRY.BIN (IP2L-DB1 20131025 Copyright (c) 2013 IP2Location All Rights Reserved)
*3*DB-Info: BuiltIn: features: 0x0000100f
*3*DB-Info: BuiltIn: info of available databases
*3*DB-Info: BuiltIn: ASN : IANA/20130730
*3*DB-Info: BuiltIn: CC : AFRINIC/20130806 APNIC/20130805 ARIN/20130805 LACNIC/20130805 RIPENCC/20130805
*3*DB-Info: BuiltIn: IPv4 : AFRINIC/20131014 APNIC/20131014 ARIN/20131014 IANA/20130520 LACNIC/20131014 RIPENCC/20131014
*3*DB-Info: BuiltIn: IPv6 : AFRINIC/20131015 APNIC/20131014 ARIN/20131014 IANA/20130215 LACNIC/20131014 RIPENCC/20131014
*3*DB-Info: BuiltIn: IEEE : IAB/20131015 OUI/20131015 OUI36/20131015</PRE
></FONT
></TD
></TR
></TABLE
><P
>Simple statistics section</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>ALL 108525
IPv4 46233
IPv6 62292
UNKNOWN 0
IPv4/APNIC 2397
IPv4/ARIN 3525
IPv4/RIPE 40198
IPv4/LACNIC 97
IPv4/UNKNOWN 16
IPv6/6bone 0
IPv6/IANA 0
IPv6/APNIC 129
IPv6/ARIN 839
IPv6/RIPE 61074
IPv6/LACNIC 0
IPv6/RESERVED 0
IPv6/UNKNOWN 0
IPv6/6to4/IANA 0
IPv6/6to4/APNIC 0
IPv6/6to4/ARIN 16
IPv6/6to4/RIPE 51
IPv6/6to4/LACNIC 0
IPv6/6to4/RESERVED 0
IPv6/6to4/UNKNOWN 0
IPv6/Teredo/IANA 0
IPv6/Teredo/APNIC 63
IPv6/Teredo/ARIN 0
IPv6/Teredo/RIPE 90
IPv6/Teredo/LACNIC 30
IPv6/Teredo/RESERVED 0
IPv6/Teredo/UNKNOWN 0
IPv6/NAT64/IANA 0
IPv6/NAT64/APNIC 0
IPv6/NAT64/ARIN 0
IPv6/NAT64/RIPE 0
IPv6/NAT64/LACNIC 0
IPv6/NAT64/RESERVED 0
IPv6/NAT64/UNKNOWN 0
IPv6/IID/Global 1436
IPv6/IID/Random 58198
IPv6/IID/Manual 2055
IPv6/IID/ISATAP 353
IPv6/IID/Unknown 0</PRE
></FONT
></TD
></TR
></TABLE
><P
>External database supported output since output version 3.0 (>= 0.95.0)</P
><P
></P
><UL
><LI
><P
>Country Code / Proto</P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>...
*3*CC-code-proto/DE/ALL 96450
*3*CC-code-proto/DE/IPv4 36486
*3*CC-code-proto/DE/IPv6 59964
*3*CC-code-proto-list/DE 96450 36486 59964
...</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
><UL
><LI
><P
>Proto / Country Code (“ALL” line contains: ALL IPv4 IPv6)</P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>...
*3*CC-proto-code/ALL/DE 96450
*3*CC-proto-code/IPv4/DE 36486
*3*CC-proto-code/IPv6/DE 59964
...
*3*CC-proto-code-list/ALL 108525 46483 62042</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
><UL
><LI
><P
>Autonomous System number / Proto</P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>...
*3*AS-num-proto/8767/ALL 6054
*3*AS-num-proto/8767/IPv4 2705
*3*AS-num-proto/8767/IPv6 3349
*3*AS-num-proto-list/8767 6054 2705 3349
...</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
><UL
><LI
><P
>Proto / Autonomous System number (“ALL” line contains: ALL IPv4 IPv6)</P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>...
*3*AS-proto-num/ALL/8767 6054
*3*AS-proto-num/IPv4/8767 2705
*3*AS-proto-num/IPv6/8767 3349
...
*3*AS-proto-num-list/ALL 108525 46483 62042</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><HR><H4
CLASS="SECT3"
><A
NAME="AEN658"
>14.2.2. Column output</A
></H4
><P
>Column output does not support version 3 extension, only simple statistics with a header line:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ zcat ip.bieringer.de-log.201*.gz | ipv6logstats -q -c
IPv4 IPv6 UNKNOWN IPv4/APNIC IPv4/ARIN IPv4/RIPE IPv4/LACNIC IPv4/UNKNOWN IPv6/6bone IPv6/IANA IPv6/APNIC IPv6/ARIN IPv6/RIPE IPv6/LACNIC IPv6/RESERVED IPv6/UNKNOWN IPv6/6to4/IANA IPv6/6to4/APNIC IPv6/6to4/ARIN IPv6/6to4/RIPE IPv6/6to4/LACNIC IPv6/6to4/RESERVED IPv6/6to4/UNKNOWN IPv6/Teredo/IANA IPv6/Teredo/APNIC IPv6/Teredo/ARIN IPv6/Teredo/RIPE IPv6/Teredo/LACNIC IPv6/Teredo/RESERVED IPv6/Teredo/UNKNOWN IPv6/NAT64/IANA IPv6/NAT64/APNIC IPv6/NAT64/ARIN IPv6/NAT64/RIPE IPv6/NAT64/LACNIC IPv6/NAT64/RESERVED IPv6/NAT64/UNKNOWN IPv6/IID/Global IPv6/IID/Random IPv6/IID/Manual IPv6/IID/ISATAP IPv6/IID/Unknown
46233 62292 0 2397 3525 40198 97 16 0 0 129 839 61074 0 0 0 0 0 16 51 0 0 0 0 63 0 90 30 0 0 0 0 0 0 0 0 0 1436 58198 2055 353 0</PRE
></FONT
></TD
></TR
></TABLE
><P
>An optional prefix token can be given (“-p <prefix>”) to create e.g. in a for-loop one line per month and put month in front of statistics, also the header line can be suppressed (“-n”).</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ zcat ip.bieringer.de-log.201*.gz | ipv6logstats -q -c -n -p ALL
ALL 46233 62292 0 2397 3525 40198 97 16 0 0 129 839 61074 0 0 0 0 0 16 51 0 0 0 0 63 0 90 30 0 0 0 0 0 0 0 0 0 1436 58198 2055 353 0 </PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN664"
>14.3. Examples</A
></H3
><P
>A demonstration with real data is available at <A
HREF="http://mirrors.bieringer.de/stats/timeline.html"
TARGET="_top"
>http://mirrors.bieringer.de/stats/timeline.html</A
>.</P
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN668"
>15. Apache web server module “mod_ipv6calc”</A
></H2
><P
>This Apache web server module (since version 0.99.1, released 2015) interfaces with internal ipv6calc library to support</P
><P
></P
><UL
><LI
><P
>Client IP address anonymization “on-the-fly”, exported to IPV6CALC_CLIENT_IP_ANON</P
><P
></P
><UL
><LI
><P
>depending on the configured anonymization method 3rd party database is required</P
></LI
></UL
></LI
><LI
><P
>Country code of client IP address, exported to IPV6CALC_CLIENT_COUNTRYCODE</P
><P
></P
><UL
><LI
><P
>requires 3rd party database: GeoIP or IP2Location or DB-IP.com</P
></LI
></UL
></LI
><LI
><P
>Autonomous System Number (ASN) of client IP address, exported to IPV6CALC_CLIENT_ASN</P
><P
></P
><UL
><LI
><P
>requires 3rd party database: GeoIP</P
></LI
></UL
></LI
><LI
><P
>Registry of client IP address, exported to IPV6CALC_CLIENT_REGISTRY</P
><P
></P
><UL
><LI
><P
>requires internal or “external” database</P
></LI
></UL
></LI
><LI
><P
>Configured IP address anonymization method, exported to IPV6CALC_ANON_METHOD</P
></LI
></UL
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN694"
>15.1. Installation</A
></H3
><P
>Install compiled Apache module “mod_ipv6calc” to Apache's module directory</P
><P
>Install included default configuration file “ipv6calc.conf” to Apache's config directory (usually conf.d)</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN698"
>15.2. Configuration</A
></H3
><P
>Enable in “ipv6calc.conf” loading of module</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>LoadModule ipv6calc_module modules/mod_ipv6calc.so</PRE
></FONT
></TD
></TR
></TABLE
><P
>Enable module itself </P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>ipv6calcEnable on</PRE
></FONT
></TD
></TR
></TABLE
><P
>Adjust configuration settings, if needed (see examples in “ipv6calc.conf”)</P
><P
>Review predefined log format</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>LogFormat "%{IPV6CALC_CLIENT_IP_ANON}e \"%{IPV6CALC_CLIENT_COUNTRYCODE}e/%{IPV6CALC_CLIENT_ASN}e/%{IPV6CALC_CLIENT_REGISTRY}e/%{IPV6CALC_ANON_METHOD}e\" %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_anon</PRE
></FONT
></TD
></TR
></TABLE
><P
>Enable custom log with anonymized information, using the predefined LogFormat</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>CustomLog logs/access_anon_log combined_anon</PRE
></FONT
></TD
></TR
></TABLE
><P
>Restart Apache web server, check error_log for any issues</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN710"
>15.3. Result</A
></H3
><P
>The new log file contains anonymized requests like</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>252.176.92.172 "CN/23724/APNIC/keep-type-asn-cc" - [25/Jul/2015:13:20:25 +0200] "GET / HTTP/1.1" 200 3569 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"
a909:390a:909a:81d9:a909:4291:c02d:5d1d "CZ/43037/RIPENCC/keep-type-asn-cc" - [25/Jul/2015:12:59:00 +0200] "GET /robots.txt HTTP/1.1" 200 33 "-" "Mozilla/5.0 (compatible; SeznamBot/3.2; +http://fulltext.sblog.cz/)" </PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN714"
>15.4. Post-analysis in case of anonymization method “keep-type-asn-cc”</A
></H3
><P
>In case “keep-type-asn-cc” is configured and also working (required databases are available), related information of anonymized IP addresses can be retrieved using “ipv6calc” or “ipv6logstats”.</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ ipv6calc -q -m -i 252.176.92.172
IPV4=252.176.92.172
IPV4_TYPE=unicast,anonymized,global
IPV4_AS_NUM=23724
IPV4_COUNTRYCODE=CN
IPV4_REGISTRY=APNIC
...
$ ipv6calc -q -m -i a909:390a:909a:81d9:a909:4291:c02d:5d1d
IPV6=a909:390a:909a:81d9:a909:4291:c02d:5d1d
IPV6_TYPE=unicast,anonymized-iid,anonymized-prefix,global-unicast,productive,iid,iid-local
IPV6_COUNTRYCODE=CZ
IPV6_AS_NUM=43037
IPV6_REGISTRY=RIPENCC
...</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H2
CLASS="SECT1"
><A
NAME="AEN718"
>16. History</A
></H2
><P
>Major extensions/changes are listed here</P
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN721"
>16.1. 2021</A
></H3
><P
></P
><UL
><LI
><P
>add support for compressed IPv4 addresses like 10/8 (>= 3.1.0)</P
></LI
><LI
><P
>add support for octal representation of IPv4 addresses (>= 3.3.0)</P
></LI
><LI
><P
>add Database Dump action (>= 3.3.0)</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN730"
>16.2. 2020</A
></H3
><P
></P
><UL
><LI
><P
>drop GeoIP(legacy) support (>= 3.0.0)</P
></LI
><LI
><P
>drop db-ip.com(BerkeleyDB) support (>= 3.0.0)</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN737"
>16.3. 2019</A
></H3
><P
></P
><UL
><LI
><P
>add OUI-28 support (>= 2.2.0)</P
></LI
><LI
><P
>add action “addr2cc” (can be used as replacement for geoiplookup) (>= 2.1.0)</P
></LI
><LI
><P
>enable “geonameid” also in mod_ipv6calc (>= 2.1.0)</P
></LI
><LI
><P
>add anonymization method “keep-type-geonameid” (>= 2.1.0)</P
></LI
><LI
><P
>add support for MaxMindDB (GeoIP, db-ip.com) (>= 2.0.0)</P
></LI
><LI
><P
>drop support of IP2Location libraries < 7.0.1 (>= 2.0.0)</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN752"
>16.4. 2017</A
></H3
><P
></P
><UL
><LI
><P
>add support for LISP detection</P
></LI
><LI
><P
>add support for non-free versions <A
HREF="http://www.db-ip.com/"
TARGET="_top"
>DB-IP.com</A
> databases</P
></LI
><LI
><P
>finally release 1.0.0 after 16 year of development</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN762"
>16.5. 2016</A
></H3
><P
></P
><UL
><LI
><P
>implement action 'test' and extend action 'filter' with support of address ranges (>= 0.99.2)</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN767"
>16.6. 2015</A
></H3
><P
></P
><UL
><LI
><P
>Introduce mod_ipv6calc for Apache web server (>= 0.99.1)</P
></LI
><LI
><P
>Add support for <A
HREF="http://www.db-ip.com/"
TARGET="_top"
>DB-IP.com</A
> databases (by generated Berkeley DB files) (>= 0.98.0)</P
></LI
><LI
><P
>Add support for “External” database files (generated Berkeley DB files), superseeding (if newer) built-in IPv4/IPv6->Registry and adding IPv4/IPv6->CountryCode support (>= 0.98.0)</P
></LI
><LI
><P
>Extend filter options with support of CountryCode, ASN or Registry (>= 0.99.0)</P
></LI
><LI
><P
>Add support for <A
HREF="http://lite.ip2location.com/"
TARGET="_top"
>IP2Location LITE</A
> databases (>= 0.99.0), add configurable IP2Location database autoselection support</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN782"
>16.7. 2014</A
></H3
><P
></P
><UL
><LI
><P
>Shared library mode supported (reduces size of binaries)</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN787"
>16.8. 2013</A
></H3
><P
></P
><UL
><LI
><P
>Prefix and IID anonymization methods</P
></LI
><LI
><P
>Support of dynamic load of GeoIP and IP2Location libraries</P
></LI
><LI
><P
>Specifying dedicated GeoIP and IP2Location database files is now replaced by specifying dedicated database directories to make especially for GeoIP use of more database files.</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN796"
>16.9. 2011</A
></H3
><P
></P
><UL
><LI
><P
>ipv6calc/ipv6calcweb.cgi: enable included GeoIP support with IPv6 (usable with GeoIP >= 1.4.5)</P
></LI
><LI
><P
>ipv6calc: extend for 6rd support (--action 6rd_local_prefix --6rd_prefix <PREFIX> --6rd_relay_prefix <RELAY_PREFIX>)</P
></LI
><LI
><P
>ipv6calc: enable stdin support for bulk transformation</P
></LI
><LI
><P
>ipv6calc: add support for NAT64 address type</P
></LI
><LI
><P
>ipv6calc: add option “forceprefix <LENGTH>” to print prefix of an address without a given prefix length</P
></LI
><LI
><P
>ipv6loganon: extend for pipe usage (e.g. in Apache log file directive) and write/append to specified file</P
></LI
><LI
><P
>General: add configure options to disable built-in databases (reduce binary size a lot, e.g. for embedded devices)</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN813"
>16.10. 2002-2010</A
></H3
><P
>See <A
HREF="https://raw.githubusercontent.com/pbiering/ipv6calc/master/ChangeLog"
TARGET="_top"
>ChangeLog@GitHub</A
> for now</P
></DIV
><DIV
CLASS="SECT2"
><HR><H3
CLASS="SECT2"
><A
NAME="AEN817"
>16.11. 2001</A
></H3
><P
></P
><UL
><LI
><P
>Start of development</P
></LI
></UL
></DIV
></DIV
></DIV
></BODY
></HTML
>
|