OpenVZ Forum


Home » General » Support » Netstat show all (HN and VEs) opened ports
Netstat show all (HN and VEs) opened ports [message #50934] Fri, 06 December 2013 12:35 Go to next message
maidmantis is currently offline  maidmantis
Messages: 3
Registered: December 2013
Junior Member
Hi IT crowd,

I have installed OpenVZ on the Debian 7.0. Did all by this post download.openvz.org/debian/
Seems all is fine but when I execute 'netstat -tupln' I see all opened ports on HN and all VEs:


# netstat -tupln 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp   0  0  0.0.0.0:22     0.0.0.0:* LISTEN    12448/sshd      
tcp   0  0  0.0.0.0:22     0.0.0.0:* LISTEN    10706/sshd      
tcp   0  0  127.0.0.1:25   0.0.0.0:* LISTEN    2342/exim4      
tcp   0  0  127.0.0.1:25   0.0.0.0:* LISTEN    10854/sendmail: MTA
tcp   0  0  127.0.0.1:3306 0.0.0.0:* LISTEN    11779/mysqld    
tcp   0  0  0.0.0.0:80     0.0.0.0:* LISTEN    11550/apache2   
tcp   0  0  0.0.0.0:22     0.0.0.0:* LISTEN    11610/sshd      
tcp   0  0  0.0.0.0:80     0.0.0.0:* LISTEN    12385/apache2   
tcp   0  0  127.0.0.1:587  0.0.0.0:* LISTEN    10854/sendmail: MTA
tcp   0  0  127.0.0.1:25   0.0.0.0:* LISTEN    11835/exim4     
tcp   0  0  0.0.0.0:22     0.0.0.0:* LISTEN    2317/sshd
tcp6  0  0  :::22          :::* LISTEN         12448/sshd
tcp6  0  0  :::22          :::* LISTEN         10706/sshd 
tcp6  0  0  :::80          :::* LISTEN         10958/apache2   


Info:
# uname -a 
Linux local.localhost 2.6.32-openvz-042stab083.2-amd64 #1 SMP Fri Nov 8 17:59:25 MSK 2013 x86_64 GNU/Linux

linux-image-2.6.32-openvz-042stab083.2-amd64  1  amd64
linux-image-openvz-amd64          042stab083.2-1 amd64
vzctl            4.6-1     amd64
vzquota          3.0.12-3  amd64
vzstats          0.5.2-1   all
libploop1:amd64  1.9-10    amd64
ploop            1.9-10    amd64

Is it a bug or feature? How is it possibly to fix it?

Alex
Re: Netstat show all (HN and VEs) opened ports [message #50940 is a reply to message #50934] Sun, 08 December 2013 00:08 Go to previous messageGo to next message
dipps is currently offline  dipps
Messages: 22
Registered: May 2013
Location: Out in the scrub
Junior Member
It seems normal to see all that info in the HN. But if you run netstat in one of the VEs, you should only see information about that VE.
Re: Netstat show all (HN and VEs) opened ports [message #50941 is a reply to message #50940] Sun, 08 December 2013 00:18 Go to previous messageGo to next message
maidmantis is currently offline  maidmantis
Messages: 3
Registered: December 2013
Junior Member
dipps wrote on Sat, 07 December 2013 19:08
It seems normal to see all that info in the HN. But if you run netstat in one of the VEs, you should only see information about that VE.

Thanks but I can't agree with you because Debian 6.0 has no such problem. If I run netstat on the HN it shows only opened ports on this one. I just want to see netstat only for HN without VEs.
Any more ideas?

Alex
Re: Netstat show all (HN and VEs) opened ports [message #50942 is a reply to message #50941] Sun, 08 December 2013 01:02 Go to previous message
dipps is currently offline  dipps
Messages: 22
Registered: May 2013
Location: Out in the scrub
Junior Member
Well, I don't agree back Wink but I no longer have a debian 6 HN to look at. For sure, netstat in HN shows all connections in a Centos 6 HN.

I thought the kernel in the HN can "see" every process in every VE. There's only one kernel running on the box.

Not sure why you think this is a problem. If you need to, you can work out which connections belong to which VE by looking up the PIDs with vzpid.
Previous Topic: Enquiry on CentOS 5.10 + ovzkernel
Next Topic: VPS load 13.00 (two cpus aloted), SSH timeout, websites OK, unable fork
Goto Forum:
  


Current Time: Sun Feb 05 05:26:10 GMT 2023

Total time taken to generate the page: 0.01135 seconds