LAN security

HI i am new in mikrotik world and dont know how to bring a LAN more secure from outside world attacks..anyone help me with code ..please

The LAN in the default setup is already secure. Keeping your firmware up to date and not letting the outside world access to the Router are keys to success.

If you have a MikroTik home router and did not alter the default firewall, the best thing to do is upgrade the software and set secure passwords on it.
Here are some tips: https://help.mikrotik.com/docs/display/ROS7/Securing+your+router