Unable to add interface and IPs on ufw allow rule for allowing host

Discussions about using Linux guests in VirtualBox.

Unable to add interface and IPs on ufw allow rule for allowing host

Postby Marco Sulla » 25. Jun 2019, 14:38

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:
Code: Select all   Expand viewCollapse view
sudo ufw allow on enp0s3 proto tcp from 127.0.0.1 to 10.0.2.2 port 8080

but this rule does not work. I had to change it to:
Code: Select all   Expand viewCollapse view
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?
Marco Sulla
 
Posts: 8
Joined: 14. Sep 2015, 23:48

Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 5 guests