I'm running ubuntu 8.04 with vnc4server.

I'm trying to get my vnc server to listen on a specific interface. I don't want it listening on localhost, I want it listening on a virtual tun interface I setup, tun0, ip 10.6.7.0.

I tried adding the "-interface" option to the vnc4server script but Xvnc doesn't like it, "Unrecognized option: -interface".

How would I make vnc listen on a specific interface?

Recommended Answers

All 3 Replies

If it doesn't listen on localhost, it won't work.

Secondly, use iptables to allow/deny connections on a different interface if you don't want to allow connections to a specific interface.

FYI, "interface" is NOT the same as IP address, since you can have numerous IP addresses bound to the same interface (eth0, eth1, etc.)

Yes I figured vnc4server wouldn't work unless it listened on localhost, I fogot to post back here.

I switched to x11vnc, when combined with xvfb allows me to start the server on any interface.

Yes I am aware that interfaces are not the same as ip addresses, however some servers use ip addresses to idenfity the interface they will listen on, such as Bind

listen-on { 127.0.0.1; 10.6.7.0; };

And some servers use the interface to identify the interface, such as Samba,

interfaces = lo, eth1

Yup, I know the difference, but the way you originally worded it made me unsure of whether or not you understood the differences yourself.

(Incidentally, I thought the answer you got from the VNC list back on the 8th was sufficient.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.