Hundreds of anti-immigration protesters have gathered in two port cities on the south coast amid police restrictions and warnings against the use of face coverings.