I ACCEPTed the port with iptables, but I can't see which process is being used in netstat, etc.

Asked 1 years ago, Updated 1 years ago, 121 views

Prerequisites/What you want to achieve

You are trying to improve the connection error on the redis server.

I have two questions.

  • I wrote the settings on iptables to open the port to which I am connecting, but I can't see them on netstat-an or telnet.
     I set selinux to disabled, but is there anything else that could cause it?

    [hoge@fuga~]#iptables-L
    Chain INPUT (policy ACCEPT)
    target protopt source destination
    ACCEPT tcp --anywhere anywhere tcp dpt:12726
    
    Chain Forward (policy ACCEPT)
    target protopt source destination
    
    Chain OUTPUT (policy ACCEPT)
    target protopt source destination
    [hoge@fuga~] #netstat-an | grep12726
    [hoge@fuga~]#
    
  • The port with the adjacent number is empty, so I'm thinking about turning it around.
     I wonder if it's okay to change directions easily.

I wrote the settings on iptables to open the connected port, but I can't see them on netstat-an or telnet.
 I set selinux to disabled, but is there anything else that could cause it?

[hoge@fuga~]#iptables-L
Chain INPUT (policy ACCEPT)
target protopt source destination
ACCEPT tcp --anywhere anywhere tcp dpt:12726

Chain Forward (policy ACCEPT)
target protopt source destination

Chain OUTPUT (policy ACCEPT)
target protopt source destination
[hoge@fuga~] #netstat-an | grep12726
[hoge@fuga~]#

The port with the adjacent number is empty, so I think I should change the direction.
 I wonder if it's okay to change directions easily.

Centos 6.5 environment.

It may depend on the specifications of the service, but
It hasn't been long since I started an infrastructure store, so I don't know how to feel.

I would appreciate it if you could give me some advice.
Thank you for your cooperation.

linux centos iptables

2022-09-29 21:19

1 Answers

This question appears to have been resolved by @metropolis' comments.

It seems that the questioner was asked because he thought, "I set the port to be allowed, but I can't see the process using it on netstat, so I guess I haven't been able to actually allow it."

However, the process didn't actually start in the first place, and that was the reason.


2022-09-29 21:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.