Compared with the IPF group, the serum BAFF and IL-17 levels in the IPAF and CTD-ILD groups were significantly higher (p = 0.002, p < 0.001; p = 0.016, p = 0.009). This evidence concerns the gene IL17A and idiopathic pulmonary fibrosis.