Skip to content

Commit

Permalink
Updating OCI Wiki page (#42)
Browse files Browse the repository at this point in the history
* Create OCIConfiguration.md

* Update OCIConfiguration.md

* Create TMPFile

* Add files via upload

* Delete TMPFile

* Add files via upload

* Add files via upload

* Update OCIConfiguration.md

* Update OCIConfiguration.md

* Update OCIConfiguration.md

Fix URL in steps 2a and 2b.
Add some more informations on step 2b about the file edit

* Update OCIConfiguration.md
  • Loading branch information
Athar42 authored Sep 6, 2023
1 parent 4e0866b commit e23e94d
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions community/OCIConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ If we had selected it, we would have needed to create a rule to allow ANY destin

## Step 2a - Oracle Linux 8

The official guide on how to open your ports can be found there : https://docs.oracle.com/en/operating-systems/oracle-linux/8/firewall/firewall-ConfiguringaPacketFilteringFirewall.html#ol-firewall
The official guide on how to open your ports can be found there : [https://docs.oracle.com/en/operating-systems/oracle-linux/8/firewall/firewall-ConfiguringaPacketFilteringFirewall.html#ol-firewall](https://docs.oracle.com/en/operating-systems/oracle-linux/8/firewall/firewall-ConfiguringaPacketFilteringFirewall.html#ol-firewall)

But, here is the summary on what you have to do for your Oracle Linux setup :

Expand Down Expand Up @@ -99,11 +99,11 @@ sudo firewall-cmd --reload

## Step 2b - Ubuntu

As per Oracle's Best Practices, follow the steps explained here : https://blogs.oracle.com/developers/post/enabling-network-traffic-to-ubuntu-images-in-oracle-cloud-infrastructure ; At the chapter "Host Firewall".
As per Oracle's Best Practices, you can follow the steps explained here : [https://blogs.oracle.com/developers/post/enabling-network-traffic-to-ubuntu-images-in-oracle-cloud-infrastructure](https://blogs.oracle.com/developers/post/enabling-network-traffic-to-ubuntu-images-in-oracle-cloud-infrastructure) ; At the chapter "Host Firewall" or just read the quick steps below.

The method used there is to edit a file named "/etc/iptables/rules.v4" and add your rules in there.
The method used there is to edit a file named "/etc/iptables/rules.v4" and add your own rules in there.

Your file should look like this (the start of it at least) :
Your initial file should look like this (the start of it at least) :
```
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
# iptables configuration for Oracle Cloud Infrastructure
Expand All @@ -119,12 +119,17 @@ Your file should look like this (the start of it at least) :
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p udp --sport 123 -j ACCEPT
-A [...]
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
[...]
-A InstanceServices [...]
COMMIT
```

You can then insert a new line, for BlueMap, this would look like this :
You can then insert a new line, for BlueMap (but before the global REJECT rules !), this would look like this :
```
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
# iptables configuration for Oracle Cloud Infrastructure
Expand All @@ -140,18 +145,36 @@ You can then insert a new line, for BlueMap, this would look like this :
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p udp --sport 123 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8100 -j ACCEPT
-A [...]
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
[...]
-A InstanceServices [...]
COMMIT
COMMIT
```

> Be carefull while adding lines in this file !
> You have to put your new lines BEFORE the "REJECT" rules ("-A INPUT -j REJECT --reject-with icmp-host-prohibited").
> By not following this, the firewall could apply, by default, the "deny" rule (sometime this could work, but just not everytime).
{: .info .important }

Now, save the file and after that, you can either chose to reboot the server or run the following command :

**If you are NOT using the root privileges :**
```
sudo iptables-restore < /etc/iptables/rules.v4
```

**If you are using the root privileges :**
```
iptables-restore < /etc/iptables/rules.v4
```

## Step 3 - Enjoy !

If you did arrive there, you should be able to access your web map with the address : http://Your_Server_Public_IP:Your_BlueMap_Web_Port (port, by default is 8100).
Expand Down

0 comments on commit e23e94d

Please sign in to comment.