Sponsored Content
Full Discussion: IP Tables Add Open Port 3306
Operating Systems Linux IP Tables Add Open Port 3306 Post 302545330 by fspalero on Monday 8th of August 2011 06:04:47 AM
Old 08-08-2011
IP Tables Add Open Port 3306

Hi,

Anyone can help me on how to open a port 3306 on Centos 5 for my localhost (127.0.0.1), currently I have the list iptables -L;
Code:
 
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
 
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
 
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 0.0.0.1 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8089
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8003
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8004
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmp
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmptrap
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:shell
ACCEPT udp -- anywhere anywhere state NEW udp dpt:syslog
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:10050
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:10051
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8042
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8043
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ldap
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8044
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8047
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8048
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Thanks in Advance,
FSPalero

---------- Post updated at 06:04 PM ---------- Previous update was at 05:18 PM ----------

I did these steps;
Code:
# iptables -A INPUT -p tcp -s 127.0.0.1 --dport 3306 -j ACCEPT
 
# service iptables restart
 
# iptables -L -n -v
 
# iptables -L -n
 
# netstat -tulpn | more

But still can't listen/open the port. Anywork around please.

Last edited by Scott; 08-08-2011 at 07:08 AM.. Reason: Use code tags, please
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Open Port 3306 for MySQL connection

I am needing to "un-block" port 3306 so that I can access MySQL from another PC. When I installed Mandrake 8.1, I set the security level to high because it is going to be a web server. I believe I have to allow access to my ports now and I do not know the commands to do that. If anyone... (4 Replies)
Discussion started by: gdboling
4 Replies

2. Linux

open port

How can I open a port on linux machine ??? (5 Replies)
Discussion started by: mm00123
5 Replies

3. IP Networking

Unknown open port: "6881/tcp open bittorrent-tracker" found with nmap

Hi. I ran nmap on my server, and I get the following: Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-19 16:33 EDT Interesting ports on -------- (-----): Not shown: 997 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 6881/tcp open bittorrent-tracker The... (0 Replies)
Discussion started by: Rledley
0 Replies

4. Solaris

how to open specific port

Dear members, My release is open Solaris b103 1- How to know the opening port in my system 2- How to open a specific port like port number 53 3- How to closed the specific port like port number 53 Your feedback highly appreciated (10 Replies)
Discussion started by: dellroxy
10 Replies

5. Solaris

Open port on Solaris 10

Hi All, I am installing Infosphere (ETL tool) on solaris 10. One of the requirement is to open multiple ports for different apps that will be installed. I ran netstat -n | grep 9080 (,etc) but that did not return anything. I have attached the requirement. Can anyone guide me about how to... (3 Replies)
Discussion started by: sumeet
3 Replies

6. UNIX for Dummies Questions & Answers

Linux - How to Open a Port

Hi, I would like to open a specific port for use with a bespoke application. Before everyone points me to other threads - I read a few but couldn't find any specific to my problem. Iptables / firewall is disabled SELinux is also disabled I would just like to assign this port to this... (0 Replies)
Discussion started by: mcclunyboy
0 Replies

7. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

8. HP-UX

How to open 443 port in HP-UX?

Hello Experts, I want to open the port 443 on my HP-UX system. can you please help ? Thanks in advance. (1 Reply)
Discussion started by: purushottamaher
1 Replies

9. UNIX for Beginners Questions & Answers

Script for port is open or not

I need a script on which if i will pass the port number and the host name as external parameter then it should respond me if the port is open or not thread moved (0 Replies)
Discussion started by: patitapaban
0 Replies

10. Cybersecurity

Blocking 3306 with iptables -A INPUT -p tcp --dport 3306

Just added these lines to our server firewall: iptables -A INPUT -p tcp --dport 3306 -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT iptables -A INPUT -p tcp --dport 3306 -j DROP Even though mysql is configured to correctly only listen on port 127.0.0.1 we still see these mysql log file notes on a daily... (0 Replies)
Discussion started by: Neo
0 Replies
OCF_HEARTBEAT_MYSQL()													     OCF_HEARTBEAT_MYSQL()

NAME
ocf_heartbeat_mysql-proxy - Manages a MySQL Proxy daemon SYNOPSIS
mysql-proxy [start | stop | reload | monitor | validate-all | meta-data] DESCRIPTION
This script manages MySQL Proxy as an OCF resource in a high-availability setup. Tested with MySQL Proxy 0.7.0 on Debian 5.0. SUPPORTED PARAMETERS
binary Full path to the MySQL Proxy binary. For example, "/usr/sbin/mysql-proxy". (optional, string, default /usr/sbin/mysql-proxy) defaults_file Full path to a MySQL Proxy configuration file. For example, "/etc/mysql-proxy.conf". (optional, string, no default) proxy_backend_addresses Address:port of the remote backend-servers (default: 127.0.0.1:3306). (optional, string, default 127.0.0.1:3306) proxy_read_only_backend_addresses Address:port of the remote (read only) slave-server (default: ). (optional, string, default 127.0.0.1:3306) proxy_address Listening address:port of the proxy-server (default: :4040). You can also specify a socket like "/tmp/mysql-proxy.sock". (optional, string, default :4040) log_level Log all messages of level (error|warning|info|message|debug|) or higher. An empty value disables logging. (optional, string, no default) keepalive Try to restart the proxy if it crashed (default: ). Valid values: true or false. An empty value equals "false". (optional, string, no default) admin_address Listening address:port of the admin-server (default: 127.0.0.1:4041). (optional, string, default 127.0.0.1:4041) admin_username Username to allow to log in (default: ). (optional, string, no default) admin_password Password to allow to log in (default: ). (optional, string, no default) admin_lua_script Script to execute by the admin plugin. (optional, string, no default) parameters The MySQL Proxy daemon may be called with additional parameters. Specify any of them here. (optional, string, no default) pidfile PID file (optional, string, default /var/run/resource-agents/mysql-proxy-default.pid) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 30s. stop Stops the resource. Suggested minimum timeout: 30s. reload Suggested minimum timeout: 30s. monitor Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 60s. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 30s. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s. EXAMPLE
The following is an example configuration for a mysql-proxy resource using the crm(8) shell: primitive example_mysql-proxy ocf:heartbeat:mysql-proxy op monitor depth="0" timeout="20s" interval="60s" SEE ALSO
http://www.linux-ha.org/wiki/mysql-proxy_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) OCF_HEARTBEAT_MYSQL()
All times are GMT -4. The time now is 07:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy