0

I'm using RedHat version 7. My AWS instances are in a security group with ample permissions for inbound connectivity. I can do Yum updates. The servers can ping each other. I can transfer files from my workstation to the servers. I even temporarily allowed all traffic from any IP address. This didn't seem to help me.

I understand that RedHat v7 doesn't use IP tables by default. RedHat v.7 uses firewalld or something similar. I tried shutting off the firewall.

I used this command to configure the firewall: system-config-firewall-tui I unchecked the "Enabled" option for the firewall and saved changes.

I ran these commands: systemctl stop iptables systemctl stop firewalld systemctl disable firewalld

I have root permissions. The nmap utility indicates that almost every port is blocked. I tried the nmap utility against specific ports and multiple ports from one Linux server to itself and a second Linux server on the network to the original Linux server. I would get something like this:

Host is up (0.00042s latency). PORT STATE SERVICE VERSION 6379/tcp closed unknown

I double checked the nmap results with a bash script with these lines:

exec 6<>/dev/tcp/127.0.0.1/6379 || echo "Not listening on port 6379" exec 6>&- # close output connection exec 6<&- # close input connection

The above bash script indicated that the port was closed. (The script was from this link: https://stackoverflow.com/questions/9609130/quick-way-to-find-if-a-port-is-open-on-linux)

I enabled the iptables just to see if a firewall needed to be running. I ran this to try to open port 6379:

iptables -A INPUT -p tcp --dport 6379 -j ACCEPT

The above command has no response. I just go to another prompt.

What can I do to open port 6379? It seems like only port 22 is open.

Propulsion
  • 148
  • 2
  • 9

1 Answers1

0

from 'outside' of AWS you may find that the majority of your ports are fire-walled off from any EC2 instances.

you need to go into your EC2 Security settings and enable access to those TCP ports ( from any IP addresses that you wish to have access to them.

  • Are you talking about Network & Security -> Security Groups? When I log into the AWS Management Console (GUI), I go to Services -> All AWS Services -> EC2, I see Network & Security. From there I go to Security Groups. I have inbound rules allowing all traffic across all protocols throughout all ports for the IP address I use to connect to each of the two Linux servers I have. I also have inbound rules allowing all traffic across all protocols throughout all ports for the IP address that I see when I type ifconfig on each of the two Linux servers I have. What should I do now? – Propulsion Mar 03 '15 at 03:32
  • 1
    Have you assigned those security groups to your running instances? – EEAA Mar 03 '15 at 04:37
  • Yes. The Security Groups column in the "Instances" section shows they are using the security group wherein I edited a rule. This rule allows all traffic across all ports among the AWS instances. – Propulsion Mar 07 '15 at 04:45