Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a box running a fresh install of Fedora 15. I've installed TigerVNC server on it and client on my Windows machine.

I've added -A INPUT -m state --state NET -m tcp -p tcp --dport 5900 -j ACCEPT to /etc/sysconfig/iptables

then, added to /etc/sysconfig/vncservers: VNCSERVER="1:UNAME" VNCSERVERARGS[1]="-geometry 1024x768"

then I try to start the server, but I get job failed. See bla bla for details ((mentions some files i have no idea to find))

What am I doing wrong?

-thanks!

iptables -nvL:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
  173 12044 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
 1518 85858 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:5900

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT 1613 packets, 146K bytes)
 pkts bytes target     prot opt in     out     source               destination``

systemctl:

vncserver.service         loaded failed failed        LSB: start|stop|restart|try-restart|status|force-reload vncserver
share|improve this question
    
What are your firewall settings then? (iptables -nvL) And copy-paste the full error messages. –  Gilles Jun 3 '11 at 19:38
    
i've posted it :D –  Jason94 Jun 3 '11 at 20:10
add comment

2 Answers 2

up vote 3 down vote accepted

The "1:user" tells the vnc server that the username user is map to display 1, so the port number to access this user via vnc is 5901.

Note: "By default, VNC uses ports numbered 5900 plus the display number. In this example, the display is 1, so the port number is 5901.

share|improve this answer
add comment

I think there are two problems. One problem is that your firewall rules are wrong. It doesn't explain the service vncserver start [failed] though, so you probably have another problem there. Do post the bla bla.

Look at the INPUT chain in the iptables rules: they're processed in order, so when you try to open a connection on port 5900, the kernel goes: hmm, not RELATED or ESTABLISHED, not icmp, not loopback, not to port 22, aha that REJECT rule matches, end of story. You need to add the rule for port 5900 before the REJECT rule (just after the existing rule for port 22).

That's assuming you do want to open the VNC port, which means that everything including your VNC password will be travelling in cleartext on your LAN. If that's a problem, you could tunnel VNC over SSH (I have no idea how do set it up on the Windows side).

share|improve this answer
    
[root@SERVER UNAME]# service vncserver start Starting vncserver (via systemctl): Job failed. See system logs and 'systemctl status' for details. [FAILED] –  Jason94 Jun 3 '11 at 20:32
    
after fixing the chain i now get connection refused (got timed out). but the vnc server is not up as u see from the error above –  Jason94 Jun 3 '11 at 20:33
    
@Jason94: Add the output of systemctl status vncserver to your question. Also go and look at files in /var/log: check the time, run service vncserver start, and post all log lines that appeared while the command was running. –  Gilles Jun 3 '11 at 20:36
    
systemctl is added, ill do the /var/log thingy now –  Jason94 Jun 3 '11 at 20:40
    
could not find anything related to svn in /var/log –  Jason94 Jun 3 '11 at 20:42
show 1 more comment

Your Answer

 
discard

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.