Hi there
I’m using Ubuntu 14x and due to security, I’d like to limit ssh connections to just my VPN (OpenVPN) address.
How to proceed? I found many ways, but AllowUsers root@ip didn’t do the job.
Thanks, Sullivan
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!
This comment has been deleted
Thank you very much.
That means
iptables -I INPUT -p tcp ! -s 178.000.000.000 --dport 22 -j DROP
will protect my server on port 22 and ssh will only be allowed through this ip?
Best
Configure your Firewall, (iptables or ufw) to reject connections on your SSH Port unless from that specific IP Address. Using something like the below: iptables -I INPUT -p tcp ! -s <permittedIP> -j DROP
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.