Set up a droplet having the private networking option enabled. My aim is to:
I tried both these iptables (flipped order between two options), to absolutely no avail:
:INPUT ACCEPT [3:180] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [255:30170] -A FORWARD -i eth0 -j DROP -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT COMMIT
:INPUT ACCEPT [3:180] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [255:30170] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -i eth0 -j DROP COMMIT
Testing the changes this way:
Go on another droplet, and ssh using both of these:
In both cases, both keep working fine.
When I tried just this in the iptables:
iptables -I INPUT -i eth0 -j DROP
I couldn’t SSH using the private IP either.
I’m using the ams2 datacentre for both droplets.
Thanks and regards
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!