Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know how to specify a listening port of VNC server under Linux, but what puzzles me is I can not find a way to specify a VNC listening IP.

When started VNC server under CentOS 5.6, I found its process "Xvnc" is listening on Maybe this is why I always failed to get in when I use any XNC client. I do not know why it listened on "lo" network interface but not on "eth0".

share|improve this question
up vote 2 down vote accepted

It sounds like your vncserver is started with localhost parameter:

# vncserver -h

usage: vncserver [:<number>] [-nohttpd] [-name <desktop-name>] [-depth <depth>]
                 [-geometry <width>x<height>]
                 [-pixelformat rgbNNN|bgrNNN]

# Xvnc -h
Unrecognized option: -h
Global Parameters:
  localhost      - Only allow connections from localhost (default=0)

You should probably check the /etc/sysconfig/vncservers and the init script /etc/init.d/vncserver.

If you want to bind to specific IP, do it with iptables or take a look at this.

share|improve this answer
Thanks.That is the "-localhost" configuration in /etc/sysconfig/vncservers: VNCSERVERARGS[3]="-geometry 1280x768 -nolisten tcp -localhost – user107233 Mar 29 '12 at 3:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.