Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Howto install and configure Tightvnc server on SMS?
View previous topic :: View next topic  
Author Message
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Sat Jun 07, 2014 1:13 pm    Post subject: Howto install and configure Tightvnc server on SMS? Reply with quote

Hi all,

I am new to sms installed it as a server to replace my old windows server 2003.

I noticed that this sms works faster and better than the microsoft server i had before.

I have a problem to configure Tightvnc server and when i connect with tightvnc viewer from a windows 7 workstation. I keep getting the Error like "The connection is been rejected from the server you tried to connect" Anyone knows a link to a good tutorial to install and configure tightvnc server? Because i want to use the Remote function to control my server on other workstation Windows 7 Ultimate.
I am new to sms linux have some expirience with ubuntu and a old red hat.

_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Sat Jun 07, 2014 8:20 pm    Post subject: Reply with quote

Hello,

Just do a
Code:
smsconfig vnc cf

and edit or add a new line with something like
VNCSERVERS="1:root"

Code:
smsconfig vnc on
smsconfig vnc start
smsconfig vnc st


You should see vnc running with latest command...

Now to connect depending on the client you need to pass the port as 5901.
If you use another port like 51, useful for not disturbing the current DISPLAY (1) you should pass port 5951.

Now to start it automatically at boot add in /etc/rc.d/rc.local
Code:
if [ -x /etc/rc.d/rc.vncservers ]; then
 /etc/rc.d/rc.vncservers start
fi


gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Sun Jun 08, 2014 6:53 pm    Post subject: Tightvnc running but connection keps being refused by server Reply with quote

I got the tightvnc up and running now. Thats great!

Thanks for your input. But one problem left to me now.

When i try to open a connection from my windows 7 workstation with the Tightvnc viewer for windows. I still recieve a error message.

Error in TightVNC Viewer: Cannot make a connection. Cause the destination computer has refused the connection.

I cannot find anywhere if the firewall on sms is standard on? Is this the case. How can I enter the right ports to open them in the firewall?

_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Sun Jun 08, 2014 7:47 pm    Post subject: Reply with quote

I forgot to tell you to run "vncpasswd" to set your password and restart vnc
Code:
smsconfig vnc rs


SMS has no firewall by default, so your problem is probably the wrong port you enter on tightvnc viewer, or your windows firewall or a 3rd app firewall either on a antivirus or stand alone...

if you set 1 it's 5901, if you set 2 it's 5902 and so on...

Whats the output of
Code:
cat /etc/rc.d/rc.vncservers.conf


gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Sun Jun 08, 2014 9:54 pm    Post subject: reply with attachment Reply with quote

Here is a screenshot of the asked file.
Strange thing i just experienced is that I cannot make access over the network to my webmin anymore suddenly stopped working. But on the server itself I can open webmin without a problem. I Pulled out all of the firewalls and created a staight line peer to peer to server but without a sollution. it still doesnt work. So can it be still a infra problem? Infra now is peer to peer. Or is it co-incidence?



snapshot1.png
 Description:
 Filesize:  56.11 KB
 Viewed:  3183 Time(s)

snapshot1.png



_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Sun Jun 08, 2014 9:59 pm    Post subject: Windows firewall turned completly off Reply with quote

I didnt mentioned it yet but i turned my windows firewall off to be sure it was my first thought too that that one blokked the connection. Other strange thing is I cannot connect to my cups installed printer too. It isnt be found on the windows network and if configered manualy the printer doesnt respond at all.
_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Sun Jun 08, 2014 10:30 pm    Post subject: Reply with quote

First thing check if fail2ban have you banned over failed attempts with
Code:
tail -100 /var/log/fail2ban.log

or simply restart fail2ban to clear rules with
Code:
/etc/rc.d/rc.fail2ban restart

and check your connectivity to SMS again...

Your VNC port is 5901, so in tightvnc viewer enter
[your.IP]:1 or [your.IP]:5901

Also if you have another linux machine on network you can use nmap to check if port is open with
Code:
nmap [sms ip] -p 5901


running nmap from SMS you should see what services are running too
Code:
nmap 127.0.0.1


gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Mon Jun 09, 2014 10:57 am    Post subject: log files fail2ban and vnclog Reply with quote

Here are my fail2ban and the vnc logs. Cannot make out why i still cannot connect?
I got the feeling the problem is small. But I just cant get to it? Very Happy



vnc_log.txt
 Description:

Download
 Filename:  vnc_log.txt
 Filesize:  4.84 KB
 Downloaded:  3505 Time(s)


fail2banlog.txt
 Description:

Download
 Filename:  fail2banlog.txt
 Filesize:  11.96 KB
 Downloaded:  3448 Time(s)


_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Mon Jun 09, 2014 2:03 pm    Post subject: closed ports Reply with quote

I installed Zenmap on my windows machine. And did nmap (sms ip) And seems the ports 5900/5901/5902 are closed on the server! See screenshot i made of testing my sms server with zenmap. Most ports are just simply closed!

How can i open those ports i need?



zenmap.png
 Description:
 Filesize:  99.13 KB
 Viewed:  3197 Time(s)

zenmap.png



_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Mon Jun 09, 2014 2:40 pm    Post subject: Reply with quote

I'm trying to reproduce your error, but I can't...

can you post the output of

Code:
smsconfig sys
smsconfig vnc st
nestat -ap|grep 5901
nmap 127.0.0.1


I tried two virtual machines with vanilla installation of SMS64 and had no problem running the vnc server and connecting with tightvnc viewer from windows...

procedure to setup is

1. type "vncpasswd" to set your password.
2. "smsconfig vnc cf" to add users
3. "smsconfig vnc start" to start vnc server

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Mon Jun 09, 2014 4:26 pm    Post subject: Reply with quote

Here the outcome of the requested commands. Weird that nmap command on the sms server shows the 5901 port is open! When i use my nmap on windows workstation sms 5901 is closed!! ???? I dont have any firewalls between the workstation and the server left. This is getting pretty weird. I tried to reinstall sms but same issue again
Shocked



smsconfig.png
 Description:
 Filesize:  62.79 KB
 Viewed:  3249 Time(s)

smsconfig.png



nmap.png
 Description:
 Filesize:  72.19 KB
 Viewed:  3242 Time(s)

nmap.png



netstatcommand.png
 Description:
 Filesize:  41.89 KB
 Viewed:  3210 Time(s)

netstatcommand.png



_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Mon Jun 09, 2014 7:08 pm    Post subject: Reply with quote

I got it running shortly after changing [user 10:root] >> was [user 1:root]
then i did [chmod -+ /etc/rc.d/rc.vncservers] and after that i setup the password once again with [vncpasswd]. Then I started [/etc/rc.d/vncservers start]

Why i dont know but then it worked. I could remotly connect on over windows. I was pretty happy. Till I shutdown the server to install it on its own place without monitor. Then i booted it and dont get vnc server working anymore????

I see when i check [smsconfig vnc st] that the service is now running!!
When I check [nmap 127.0.0.1] that port 5901 is NOT in use!!!!
When I check [netstat -ap|grep 5901] 5901 is closed.

_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
webtrip
Member


Joined: 07 Jun 2014
Posts: 22
Location: Netherlands

PostPosted: Mon Jun 09, 2014 7:17 pm    Post subject: GOT IT!!!!!! Reply with quote

I know what the problem was!!!!!!

I changed the port no to 5810 with [user 10:root]
It gave an error with starting therefore because 5801 was in use by another http service or something like that. Thats why i changed it. After reboot I still need to manaly boot vnc server.That can be done over webmin session. So it runs now.

Thanks for the support!!! Now finaly i can start building my server like I want Wink
This server really works stable and fast I'm impressed!!

_________________
Richard Trip
Field Service Engineer (IT & Document Sollutions )
Printer/MFP specialist
Back to top
View user's profile Send private message Send e-mail
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Mon Jun 09, 2014 7:40 pm    Post subject: Reply with quote

To start it automatically at boot add in /etc/rc.d/rc.local
Code:
if [ -x /etc/rc.d/rc.vncservers ]; then
 /etc/rc.d/rc.vncservers start
fi


port 58xx is for http vnc server, tightvnc server run on both http 58xx and tcp 59xx ports.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional