I run Lubuntu 18.0.4 on a Virtualbox VM hosted by Windows 10.

I added a port forwarding in Virtualbox, and I had also to add a rule for ufw. I tried:

sudo ufw allow on enp0s3 proto tcp from to port 8080

but this rule does not work. I had to change it to:

sudo ufw allow proto tcp from any to any port 8080

It works, but I would restrict the rule to the specific interface and IPs. I tried to add interface, from IP and to IP one by one, but they do not work.

Where I'm wronging?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.