How secure is a connection between two Digital Ocean servers? Would network traffic be accessible to any other servers?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
@richardg
If you’re using Ubuntu, a more simplified alternative (and overlay on top of)
iptables
isufw
. You should assume the worst and prepare for it, regardless of the access method. Usingufw
you can set up a deny all rule first, then set up your allow rules individually.The deny all should be set first as, IIRC, the rules are followed in the order they are set so, for instance, allowing Port 22, then setting up a deny all rule will still allow access on Port 22 since the allow rule was set first.
On Ubuntu you can use something such as:
And then type in
y
and hit enter/return.What The Commands Do
ufw
, if enabled.ufw
Port 53 (DNS) is setup to allow connections on both TCP and UDP as without these rules in place, you may run in to issues using
apt-get update | upgrade | install
since connects to and from may not be able to resolve properly.The others simply allow connections through so that you can connect to SSH and receive incoming requests via the standard HTTP/HTTPS ports.
You can add additional rules by simply changing the port number and choosing a protocol, like so:
Most connections are going to be over TCP unless there’s something that explicitly requires that UDP be allowed. That should be stated, otherwise it’s safe to say that TCP should be used as the protocol.
The benefit here is that by using
ufw
you’re covering your IPv4, IPv6 and Private Network IP’s with one solution.Private network is not open to the world, but it IS open to every droplet in the region … which is a huge number of droplets. So, you do need to implement security. You can use iptables and vpn. There are tutorials already written here to do just that.