The fabrication of nanoscale membranes exhibiting high selectivity is an emerging field of research. The possibility to use bottom-up approaches to fabricate a filter with porous graphene and analyze its functionality with first principle calculations is investigated. Here, the porous network is produced by self-assembly of the hexaiodo-substituted macrocycle cyclohexa-m-phenylene (CHP). The resulting porous network exhibits an extremely high selectivity in favor of H2 and He among other atmospheric gases, such as Ne, O2, N2, CO, CO2, NH3, and Ar. The presented membrane is superior to traditional filters using polymers or silica and could have great potential for further technological applications such as gas sensors or fuel cells.