CentOS/RedHat make port 8080 visible

I am a happy DigitalOcean customer primarily because of the low cost, the SSD drives, the friendly stuff and the flexibility by which you can reshape your purchased resources into droplets within the 4 DataCenters (2 in NY and 2 in Amsterdam) supported.

Until the need for a UK DataCenter arises which leads me to RackSpace.

On both private cloud hosting providers I am making a web service available that needs to be accessible @ port 8080. The CentOS flavour assembled in DigitalOcean has everything permitted by default in its iptables settings but the one assembled in RackSpace does not.

When I issue the iptables command I get:


[dimitrisli@lon1 ~]# iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

And just by adding permission for port 8080 will put it by default under the last reject input policy so the correct command should be putting the permission at the current spot of the reject input policy:


[dimitrisli@lon1 ~]# iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT -m comment --comment "Jetty Server port"

[dimitrisli@lon1 ~]# service iptables save

that eventually does the trick.

Advertisements

CentOS/RedHat screen command

Install screen:


yum install screen.x86_64

Create a screen by giving it a name:


screen -S process1

Detach from the current screen:

shortcut: Ctrl + A + D

Inspect running screens:


screen -ls

There is a screen on:
11174.process1 (Detached)
1 Socket in /var/run/screen/S-root.

Reattach to running screen per name:

screen -R process1