Microsoft
Software
Hardware
Network
Question : CentOS 5.3: iptables: remote logins lock outs?
Hello experts,
I am about to implement my firewall remotely...
The tutorial below says that to prevent accidental remote user lock outs, one should should allow LAN SSH connections over port 22.
# Accept tcp packets on destination port 22 (SSH) from private LAN
iptables -A INPUT -p tcp -s 192.168.0.0/24 --dport 22 -j ACCEPT
However, when I run /usr/sbin/lsof |egrep ESTABLISHED, I get results below:
[root@pggen /]# /usr/sbin/lsof |egrep ESTABLISHED
smbd 5843 root 23u IPv4 175254 TCP pcgen:microsoft-ds->pcgen1
:neod1 (ESTABLISHED)
sshd 9187 root 3u IPv6 179669 TCP pcgen:ssh->pcgen1:9291 (ESTABLISHED)
sshd 9189 user1 3u IPv6 179669 TCP pcgen:ssh->pcgen1:9291 (ESTABLISHED)
does this mean that my ssh session is on port 9291?
what is my smbd running on? is neod1 a port number?
also, how do I allow yum? what port?
thx,
Regards,
Answer : CentOS 5.3: iptables: remote logins lock outs?
Nope, not port 9291. That's where your ssh connection is originating (on pcgen1).
Your established connections are on pcgen:ssh (ssh is named here, rather than numbered as port 22), and pcgen:microsoft-ds (again, named here rather than numbered as port 445). You can view your /etc/services file to compare named services with their expected ports. You'll see that "neod1" is in there, as port 1047, but I think that's misleading -- you just happen to have connected from port 1047 on pcgen1, you aren't really using neod1 (Sun's NEO Object Request Broker).
As long as you don't block outgoing connections, yum should work just fine.
Random Solutions
How can I list all the properties and values of an object in ASP.NET?
Script to enable folder auditing
Microsoft VBScript runtime error '800a0009', Subscript out of range: '42'
Hyperlink issues
Problem with host only networking with VMware workstation 7.1
Interview Question: Threads
Spam black list removal " dnsbl.burnt-tech.com"
Routing Issues
Setting up Entourage 08 with Exchange 2007
Windows server 2003 open licenses