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?
– xR34P3RxMay 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.
– ArrowsomeMay 09 '20 at 08:00
@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
– ArrowsomeMay 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?
– xR34P3RxMay 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.
– ArrowsomeMay 09 '20 at 14:26