Tag Archives: linux

NFS ports

  • From /etc/services NFS basically uses 2 ports: 111 (sunrpc) and 2049 (nfs)
  • From /etc/sysconfig/nfs get all the default ports there: 875,32803,32769,892,662,2020,20049
  • How to check NFS:
    • showmount -e x.x.x.x
    • cd /net/x.x.x.x/folder
    Related config:
    • /etc/exports
    ]]>

    Tagged ,

    Remote desktop to Linux from Windows

    yum -y install vnc vnc-server Add normal user:

    #adduser user1
    #sudo su - user1
    #vncpasswd
    If you want to add root
    #vncpasswd
    Edit your config:
    #vi /etc/sysconfig/vncservers
    VNCSERVERS="1:root 2:user1"
    VNCSERVERARGS[1]="-geometry 800x600"
    VNCSERVERARGS[2]="-geometry 800x600"
    Iptables, add more multiple destination ports if required, example:
    iptables -I INPUT  -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
    To restart:
    # service vncserver restart
    # chkconfig vncserver on
    If you want to secure more, block those ports and use ssh to do tunneling inside the vnc server. On your Windows, use tightvnc or realvnc. Toubleshooting:
    1. bad hostname. Make sure you have hostname correctly. If you just install a server, non-DNS, put your hostname after 127.0.0.1, example: 127.0.0.1 hostname
    2. On your client if it’s refused, do use port. VNC uses 5901 for terminal 1, 5902 for terminal 2, etc. Therefore your connection should be: x.x.x.x:5901 or x.x.x.x:5902
    ]]>

    Tagged , ,