0

At the bash command line on an Ubuntu 16.04 server, the command 'ufw allow 9999' opens that port on every IP address being publicly exposed on the server. But I only want port 9999 to be exposed on IP address 999.999.999.999 but NOT on IP address 999.999.999.998 or any other world-facing IP address on the server. Can this be done with ufw (the 'Uncomplicated FireWall')? Many thanks in advance for your expertise.

Dave N
  • 1
  • 2
Dave
  • 1

1 Answers1

1

Lets say your eth0 IP is 100.100.100.100 any eth1 IP is 101.101.101.101. You want to expose your port 9999 via 100.100.100.100(eth0) as i understand. You can do with this

ufw allow in on eth0 to any port 9999