Please enable JS

Securing Selenium Server on Ubuntu

Selenium binds to the public IP, protected that!
March 15/Brian Young/Software

Selenium binds to 0.0.0.0!

Selenium binds to 0.0.0.0 regardless of what host info you provide when configuring Selenium. That means requests to Selenium on local and public IP addresses will be processed.

Use Ubuntu's UFW

Ubuntu comes with a package called Uncomplicated Firewall (aka UFW). It however, is not enabled by default.

Careful, you can lock yourself out!

You'll want to enable SSH access before enabling UFW or you'll lock yourself out of your machine if you depend on SSH for access.

Configuring and enabling

You'll want to enable things like SSH and possibly port 80 if you're hosting a website on this machine.

  1. sudo ufw allow ssh
  2. # If you're running a website.
  3. sudo ufw allow 80
  4. # If you're running SSL.
  5. sudo ufw allow 443

Now that we have our desired ports configured, we can enable UFW.

  1. sudo ufw enable

You should get a response message saying UFW was successfully enabled and is enabled on boot.



RELATED POSTS


Comments/ 0


LEAVE A COMMENT

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
But why?

My random thoughts and documentation on the various hardware and software projects that occupy my day-to-day. My only hope is that other people can benefit from my notes.

Recent posts
Categories