I downloaded the source code of openwrt from github, but I want to change the configuration of NATING and FILTERING(accept/drop) , but I didn't find the path of these files in source code.
Can any one tell me the path of nat and filter configuration files in source code?
Thanks.
Can you say more about your use case - why are you building your own firmware image from source?
If you just want to customize the default configuration, another option could be the Imagebuilder.
In any case, I suggest to install and run an official OpenWrt firmware image first, and adjust the configuration on the device, where you can also test it. Then download the configuration and build your own firmware with it, if that's what you need.
Setting the masq property in a zone will create corresponding masquerade (nat) rules in the appropriate chains and table. If you mean DNAT rules then this is possible as well. Refer to the documentation at https://openwrt.org/docs/guide-user/firewall/firewall_configuration