netstat? How do I change rules in it?
If I do netstat -ltn on my systm it lists all of the ports that are open and listening. Here is what it relays to me:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::111 :::* LISTEN
tcp 0 0 :::80 :::* LISTEN
tcp 0 0 :::443 :::* LISTEN
I know 127.0.0.1 is the loopback, but how do I turn off these other ports from listening? I looked up port 111 and it's open to attacks and I want to turn off whatever is listening on that port and then close that up before something bad happens. Same for port 3306, I can't even find any information about this port online, but again, I'd rather just turn off whatever is trying to use that port and take a better safe than sorry approach to securing my server.