Showing posts with label lan. Show all posts
Showing posts with label lan. Show all posts

Friday, July 9, 2010

Remote Connect via SSH or Telnet

We can connect to a remote computer using telnet (port 23) or SSH (port 22) protocols based applications. Suppose the server running an ftp service, and the server is based on operating system ubuntu. When you install ubuntu server with default options, it will install the SSH service too, also if you want setup telnet server on ubuntu(if it is not already installed). Check it using the command telnet IP-Address/Name of the system, or if you are already on the terminal of the system running the service use the command telnet 127.0.0.1 (address for the local host). If it asks for the user id and password then is is working fine, else require new installation.

To install telnet follow the steps
  1. Install inetd super server using command sudo apt-get install netkit-inetd
  2. Install telnet using the command sudo apt-get install telnetd
  3. Restart the inetd service using command sudo /etc/init.d/inetd restart
  4. Now the server is ready and can access using the command telnet ip-address/computer-name, can test it from terminal using command telnet 127.0.0.1
  5. Now can use the terminal/command prompt as you work on your terminal itself
  6. Sometimes the telnet server will show you the available menu items that you can select to perform the tasks available(you have permission) to do, for e.g. if you telnet your modem from command prompt (for e.g. telnet 192.168.1.1), you can find a set of menu items you can select it to configure the modem
Telnet and SSH provide almost the same functionality but SSH is secure than telnet.

SSH
In most cases the ubuntu server will install the ssh server when you install ubuntu. If you want access the ssh since telnet is not secure, to access the system using ssh, you can use any ssh client programs like putty. Here is how can use putty to access the system via ssh
  1. Download putty and run it
  2. Enter the host name/computer name/ip address of the system you want connect to
  3. By default, the port address will be 22 and if you are not altered the default setting for ssh on your server leave as it is, otherwise change the port address as you set for the ssh server
  4. Then click open, if it is able to connect to the server via ssh will open the terminal and you can do anything with that server that you have permission to (or can access the programs that you have access to)

Thursday, July 8, 2010

Basic Networking Commands

Here is some basic commands used in networking world
  1. ping :- ping command is used to check the computer is active in the network(ping IP-address/Computer Name, eg:-ping 192.168.1.1 or ping mydesktop or ping google.com)
  2. ipconfig :- to find out the details regarding the active network connection i.e.associated ip address, physical address, subnet mask, default gateway etc (ipconfig/all)
  3. netstat :- to find out the different ports active on the system. It displays the port number and protocol(TCP/UDP), local address with port number (local address : port), foreign address(foreign address : port), state (Active or not i.e. connection established or wait), use the command like (netstat)
  4. tracert :- it trace the route to a particular computer, for e.g:- if you want find the route to google.com so that you can find whatever IP addresses are involved in accessing google website, or which routers are involved in routing your request to google.com at that particular time(tracert google.com), remember that the table may vary in different intervals of time, the table you got at the moment may/may not be same as the table you will get after few seconds

Friday, July 2, 2010

FTP Server on Windows XP

Today want a talk about how did I setup an FTP server on my windows XP. For this I used Filezilla server. First I donwloaded the Filezilla server and installed on my Windows XP based desktop PC. Then I edited the settings for the Filezilla server, for that I opened the server interface and changed the welcome message and added a group and few users to it. The steps are noted as below,

  1. Downloaded and installed filezilla on my desktop PC named desktop
  2. Opened the admin interface clicked OK after entering the server address (127.0.0.1 by default) , port and admin password
  3. Selected the menu Edit->Settings
  4. From the left tree view selected General settings->Welcome message
  5. Changed the custom welcome message and clicked OK
  6. Then selected menu Edit->Groups
  7. On the right of the window clicked Add, then Entered the group Name "ftp users" and clicked OK
  8. Created a folder named ftp on the D- drive
  9. Clicked shared folders on left and clicked the add button on left side
  10. Selected the folder d:\ftp, set the permissions (read/write/execute etc) and clicked OK
  11. Selected menu Edit->Users
  12. Clicked Add on right side and added user "ftp user" and selected the group he belongs to, i.e "ftp users"
  13. Set the password for the user
  14. Selected shared folders on left side and added the folder d:\ftp and set the permissions for the folder
  15. Clicked Ok
  16. Finally on Start->Control panel select windows firewall and select Advanced tab and select the Connection you are using (eg:- Local area connection-LAN), and click settings and then check the FTP server in the list showing the services running on your computer the click OK twice
  17. Test the ftp server from other computer on the network using the url ftp://desktop, if you are using filezilla client enter the desktop as host and enter userid and password click quick connect
Download filezilla server and client programs from http://filezilla-project.org/

Thursday, June 24, 2010

FTP Server on Ubuntu Server

Today to talk about how I setup an ftp server for my company. As my company works on product and need to send the new releases to clients(this was done through adrive.com), my boss told me to setup an ftp server for the company so that the release can be easily copied to the server on LAN and then the clients can download it from the FTP server, so that the adrive upload could be eliminated. There is already an SVN based code server with ubuntu server operating system active in the company, so the remaining to do was not a tough job. here is how I did it with proftpd,

the following few commands made the ftp server running/active,

  • sudo apt-get install proftpd
  • sudo vi /etc/shells (appended the following line to the opened file)
/bin/false
  • sudo mkdir /home/release (this created a folder/directory named release inside /home directory)
  • sudo useradd client -p client -d /home/release -s /bin/false
  • sudo chmod 775 /home/release
  • sudo vi /etc/proftpd/proftpd.conf (edited the file as below)
Changed/added/Uncommented(i.e. removed #) the four lines in the file as
DefaultRoot /home/release
DefaultRoot ~
DenyFilter \*.*/
DisplayLogin /usr/msgs/welcome.msg (Setting up This will display/send a welcome message when user is authenticated)
  • sudo vi /usr/msgs/welcome.msg
Added the following line to the welcome.msg file
Welcome %U to My Company's FTP Server
Login Time is : %T
  • sudo /etc/init.d/proftpd restart
Now the ftp server got ready. I was able to access the ftp server using the URL
ftp://client:client@myftpservername
Also I accessed the same using filezilla where the host was "myftpservername" and user "client" and password "client".

Later I compelled to change the client password so i did it using
  • sudo passwd client
Then it asked for the new password and I updated the client password with the "new password"

For further clarifications or making server more secure go through this link http://ubuntuforums.org/showthread.php?t=79588