0
  1. ufw default deny incoming
  2. ufw default allow outgoing
  3. ufw reset
  4. ufw allow ssh
  5. ufw enable

But when I make PPTP connection to my server it is still allowed.

UFW STATUS VERBOSE

Arrowsome
  • 101
  • 1
  • Are you connecting to your pptp VPN from the PC you're running these commands on? If so, you're telling the firewall to allow outgoing connections which is why it can connect to the pptp. Or can you explain your setup more clearly? – xR34P3Rx May 09 '20 at 07:22
  • @xR34P3Rx I used https://github.com/bedefaced/vpn-install to setup VPN, then I used commands that I mentioned in the question to enable UFW. I can connect to my ubuntu 20.04 server using PPTP with both my phone and device that I use ssh on. – Arrowsome May 09 '20 at 08:00
  • Ok? So are you trying to block pptp as well? – xR34P3Rx May 09 '20 at 13:49
  • @xR34P3Rx it's more like why ufw is not working as it expected! when you reset all rules to default it should have blocked all incoming connection except openSSH – Arrowsome May 09 '20 at 14:16
  • Well other than resetting ufw after the first 2 rules, I don't see why this won't work. Why are you clearing the config? – xR34P3Rx May 09 '20 at 14:21
  • @xR34P3Rx Thanks, I read somewhere reset won't affect default configs. As the screenshot suggests the default rules are still okay after resetting configs. – Arrowsome May 09 '20 at 14:26

0 Answers0