I have a CentOS VM on my laptop running a Host-only and a NAT adapters.
I'm looking to connect to an external MySQL database on a Bluehost server. According to Bluehost the port 3306 is open.
When I run
nmap -v -sV localhost -p 3306
on my VM, it discovers open port 3306/tcp on 127.0.0.1.
I'm not sure if I want the port on 127.0.0.1 since my IP is 192.168.56.101? Not sure how to configure this further. Thanks in advance.
In iptables, I added these two lines:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --sport 3306 -j ACCEPT
Not sure whether this was a destination or a source or both?! Is this even INPUT?
nmap
command on the Bluehost server? Or your VM? What are you actually asking? Can your VM not connect correctly to the MySQL DB on the Bluehost server. As an aside, make sure the DB is locked down on the server so that only your VM (or other authenticated users) can access the database. And that data is going over the wire encrypted.