The National Cabinet has pledged to tighten Australia's gun legislation following the massacre at Bondi Beach.