Oracle Cloud Ubuntu VPS firewall settings
After installing nginx on the Oracle VPS under Ubuntu, you will find that the default port 80 cannot be connected from the static ip, which is mainly blocked by two different levels of firewalls:
VM Instance <==[ Ubuntu firewall]==> Virtual cloud Network <==[ Oracle firewall]==> Browser
Oracle firewall
Log in to the management interface
Open Virtual Colud Networks under Networking.
After you enter all the way, there will be a new Ingress Rule place. Use this to open the port, you can set multiple ports at once, here is set 0.0.0.0/0, any source can access tcp: 80.
Ubuntu firewall
The ubuntu image provided by Oracle has also been used as a firewall, mainly to defend against virtual area network attacks and get through manually.
Change to the root account:
sudo -i
Check the network card name:
ip addr show
Open port 80, the network card name in this example is ens3:
sudo iptables -I INPUT 5 -i ens3 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
Let the settings take effect after rebooting
iptables-save > /etc/iptables/rules.v4
After completing the above two items, you should be able to browse the sample website at port 80 normally.
Comments
Post a Comment