2

What's the best practise to do it by node itself, not by firewall?

Yad Smood
  • 2,752
  • 2
  • 24
  • 37

1 Answers1

5

When you call server.listen, you can pass a host to limit the the range of accepted IP addreses:

server.listen(1234, '127.0.0.1');

Laurent Perrin
  • 14,671
  • 5
  • 50
  • 49