IL-23 is a key cytokine produced by macrophages at the external body barriers – gut, skin, lung, genitourinary tract. IL-23 stimulates the protective function in a variety of innate immune cells. It includes IL-17, IL-22 secretion, granulocytes attraction and the release of bactericidal peptides. The barrier prevents generalization of bacterial/fungal infections and maintains the balance with systemic lymphoid tissue associated IL-12→IFNγ and IL-4 axis of the Th1/Th2 mediated adaptive immune system. The protection generated by T cells of adaptive immunity (antibody production and cytotoxic T cells) at external barriers now includes CD4+ IL-17 producing cells. These cells are in a balance with immunosuppressive Treg. Microbial environment at the external barriers and cytokine milieu induced by microbiota dictates the organ-specific balance between Th17 and Treg cells. The transcriptional factors FoxP3 and RORγt are involved in phenotypic control of these cells. There is ongoing loss of CD4+ T cells and an associated adaptive immunity contribution in antibacterial/antifungal control during HIV-1 infection. External barrier macrophages upregulate expression of IL-23 in response to pathogens and attract more innate immune cells, B cells and neutrophils to generate a new type of barrier (tertiary lymphoid structures in bowel, lung, skin). Expanded proliferation of epithelial cells and tissue destruction (inflammation) is a pro-tumorogenic environment. Anti-retroviral treatment will induce partial restoration of Th1/Th2 immune responses and such inflammation could be increased. However, it will not compensate the innate immune cell protective function. The secretion of IL-23 will be reduced as a result of a combination of several negative regulatory factors, such as IL-10, IFNγ and IL-4, and facilitate the development of opportunistic infections