Releasing produced water effluent in the environment is one of the environmental problems of the development of oil and gas fields, and with modern methods such as ceramic membranes, it is possible to treat and reuse this effluent. Ceramic membranes are suitable for oil wastewater treatment due to many advantages such as high thermal stability, good mechanical resistance and easy cleaning, but usually the materials used to make them are expensive or a lot of energy is consumed in the way of sintering, which leads to a high carbon footprint. In this study, inexpensive tubular ceramic membranes were made by two methods of sintering and alkali activation for the treatment of oily wastewater, which doubles the carbon footprint due to the use of waste materials in the manufacture of valuable products. For sintered membranes, the effect of adding different amounts of phosphorus slag and blast furnace slag (10%, 20% and 30%) in the mullite-zeolite membrane body was investigated. Metakaolin, phosphorus slag and calcium carbonate were used for alkali activated membrane. The structural characteristics of the manufactured membranes were evaluated by FTIR, XRD, FESEM, EDX, AFM, contact angle, porosity and average pore size, thermal stability by TGA test, mechanical stability by three-point bending test. The results of the tests for the sintered membrane showed that depending on the increase of the slag percentage from 0 to 30%, the permeability increased from 710 L/m2. h to 2323 L/m2. h for sintered membrane containing blast furnace slag and 2351 L/m2. h for sintered membrane containing phosphorus slag due to the formation of anorthite phase. The results of XRD and FTIR tests of alkali activated membranes showed that the hydrated structure of C-S-H was successfully created and a tubular porous membrane with a porosity of 39-43% and a specific permeability of 91-53 L/m2.h was obtained. COD removal of all membranes was reported in the range of 99%. In addition, membrane fouling m