Pages

Banner 468

Wednesday, 21 August 2013

Linux network tutorials - Introduction to Linux networking

0 comments
 
This is a Linux networking section. Users have learned how to install Linux, practising a few basic Linux commands which enabled them to manage Linux system in the previous Linux basics and Linux administration tutorials. Here in the Linux networking section, user will be exposed to what Linux is all about, serving network.
As you know, Linux itself is just a kernel. Linux can be configured as a networked workstation, a DNS server, a DHCP server, a web server, a mail server, a file and print server, database server, a firewall, a gateway router and many more. Is Linux can be all that? Yes it can. In this section, user will learn the true meaning of Linux, which is a network operating system or server system, to be all that mention above.
The first thing you should learn about networking is ip addresses. A server and a client computer must have an ip address so that it can be reach in network environment. Learn about Linux ip address in Linux networking - ip address and subnet mask tutorial here.
Linux server can serves networking 365 days a year without any problem. It's a proof that Linux is a very stable and secure network operating system when properly configured and maintained. All that starts with setting up a network card and configure an ip address for the server. The Linux networking - Installing Ethernet card tutorial is a guide on how to install Ethernet card in Linux computer.
You already learned about ip address and installing a network interface card, now it's time to configure Linux ip address. Here is a guide on how to Setup Slackware Ethernet ip address.
During this period of learning, understanding of Linux command structure and syntax is necessary. Setting up and configuring Linux network requires testing and troubleshooting. You might encounter errors, which is most likely, and try to troubleshoot by analysing error log files. You can learn and practice Linux network commands in Linux network commands tutorial.
Readmore...

Install the Sharing Service in Ubuntu Linux

0 comments
 

Install the Sharing Service in Ubuntu Linux

The sharing service or Samba as it is called in Ubuntu is not installed by default. The installation process of Samba varies in complexity depending on the method you will be using. I will show you the most easy and straightforward method to install Samba.
First, in Ubuntu, open the Home Folder, located in the Places menu.
Ubuntu Home Folder
Next, right-click on any folder from this window to open a contextual menu. From the contextual menu, click on Sharing Options.
Ubuntu Sharing Options
This opens the Folder Sharing window. Check the box next to ’Share this folder’.
Ubuntu Sharing
A warning window will pop-up stating that the sharing service is not installed. Click on the Install service button.
Ubuntu
Note: If you do not receive this warning, it means that the sharing service is already installed and you should be able to share files and folders. To change the Workgroup, follow the instructions found in the next section.
Then type your user account password and click on OK. The installation process will begin.
Ubuntu
In a few seconds, you will be notified that all changes have been successfully applied. Click Close and Ubuntu will ask to restart your session.
Ubuntu
Save any open files you might have and click Restart session. After the restart, the sharing service is installed and fully functioning.
Ubuntu

Configure and change the Workgroup in Ubuntu

In most cases you won’t have to change the Workgroup name because, by default, Ubuntu, Windows and Mac OS X have the same Workgroup name, which is actually “workgroup”. However, if you have to change it follow the steps detailed in this section.
Open a Terminal window and type the following command: sudo gedit /etc/samba/smb.conf.
Then, press Enter. If you haven’t previously used the Terminal this session, Ubuntu will ask you to type in your user account password.
Ubuntu
Next, the Samba configuration file will open in a gedit window. Scroll down, if necessary, until you find the workgroup line, in the Global Settings section.
Ubuntu WorkGroup
Edit the Workgroup name so that it will match the name of the Workgroup you want to add your Ubuntu computer to.
Click on Save and restart Ubuntu so that the new settings get applied.
Ubuntu WorkGroup
Readmore...
Monday, 19 August 2013

Computer networking

0 comments
 
  1. Definitions
    1. What is a Network?
    2. Network Segment
    3. Network Interface
  2. Physical Network Topologies
    1. Bus
    2. Ring
    3. Star or "Hub and Spoke"
    4. Point to Point
    5. Point to Multipoint
  3. Logical Network Topologies
    1. Peer-to-Peer
    2. Client - Server
    3. Distributed Services
  4. Communication Methods
    1. Point-to-point
    2. Broadcast, multiple access (Broadcast Domain)
    3. Broadcast, non-multiple access
    4. Nonbroadcast, multiple access
    5. Point-to-multipoint
  5. Network Devices
    1. Repeaters (Hubs)
    2. Bridges, Bridging
    3. Switches, switching
    4. Routers

Definition of a Network: What is a Network?

A network is set of computers linked together for the purpose of communicating and sharing information. The Internet is a global super-network, so is the local area network ( a LAN) at your workplace or your school, as is the wireless hotspot at your local coffee shop, hotel or library, the telehone and cellular systems, and the satellite communications in space.
What defines a network is often defined by who owns and operates the equipment and the computers that are part of the network. Thus, your school's network is separate from the Internet.
You know you have a network when you have two or more computers connected together and they are able to communicate. Plugged into the back of each computer is some sort of communications port. Nearly all computers today have one or more serial ports, parallel ports, Ethernet ports, modem ports, firewire ports, USB ports and more. All of these ports can be used in one way or another to connect computers to a network. The most common type of network port is an Ethernet port (the square port with the row of connectors on the bottom). The next most common is a wireless network connection, but that has no physical connector port.
Xerox was the first company to research and develop a network. Once upon a time, Xerox printers were extremely expensive, so companies wanted to share them. Xerox knew their printers were expensive and users were only able to print from one big computer (a mainframe) attached to the printer directly. Xerox decided that they could sell more printers if they could make it possible for anyone to use the printer from any computer. To allow multiple computers to communicate with the printer, some means of sharing a connection to the printer was needed. Xerox put Bob Metcalf and others to work on researching and designing what eventually came to be called ethernet.

Hosts, End Stations and Workstations

When people talk about networks, they often refer to computers that are at the edge of the network as hosts, end stations, workstations, or servers. Its all just the same thing, a computer attached to the network; though the word HOST has the most general meaning and can include anything attached to the network including hubs, bridges, switches, routers, access points, firewalls, workstations, servers, mainframes, printers, scanners, copiers, fax machines and more!
Just about everything electronic that has a processor and which you would use in an office is 'network capable' today and lots of things that aren't currently networked probably will be networked in the future. In many offices the phone system already IS the network (Voice over IP).

LAN, MAN, WAN and er.. IPAN??

There are some terms, acronyms actually, that are used to describe the size and scope of a network: LAN, WAN, MAN. We've added our own term 'IPAN'

LAN

A Local Area Network (LAN) is usually a single set of connected computers that are in a single small location such as a room, a floor of a building, or the whole building.

MAN

A Metropolitan Area Network (MAN) is a network that encompasses a city or town. It is usually multiple point-to-point fiber-optic connections put together by a communications company and leased to their customers, but a small number of big corporations have built a few of these of their own and opened them to the local companies with which they do business. The automotive, travel and insurance industries are just a few examples of who has built a WAN.

WAN

A Wide Area Network (WAN) is usually composed of all the links that connect the buildings of a campus together, such as at a University or at a corporate headquarters. WAN connections can often span miles, so you frequently hear peole referring to the 'WAN' connection to an office half way around the world. Usually, what distinguishes a WAN from a LAN is that there are one or more links that span a large distance over serial, T-carrier or ISDN, Frame Relay or ATM links.

IPAN

So what the heck is an IPAN? An IPAN is an Inter-Planetary Area Network. NASA has built a Deep Space Internet that uses a store-and-forward communications protocol called Disruption Tolerant Networking (DTN). The mechanical rovers Spirit and Opportunity on the planet Mars, have addresses on a NASA network and NASA uses Internet protocols to communicate with the Mars rovers. While the communication with the Spirit rover doesn't actually get transmitted over the Internet, the NASA network does have hosts spanning between the planets Earth and Mars. They also have probes they have sent into the outer solar system

How does a network work?

From a very practical and minimalist standpoint, we can start with the most common type of network, an Ethernet based local area network as an example. The network is built with several layers of technologies piled on top of one another.
  • Ethernet provides
    • Physical communication using electricity over copper wiring
    • Physical addresses (Media Access Control or MAC addresses)
  • Dynamic Host Control Protocol - DHCP
    • Provides a logical network address (an IP address)
  • Address Resolution Protocol / Reverse Address Resolution Protocol provide
    • Allows computers to announce a logical address (IP address) they are looking for and to discover which physical address (MAC address) is using that address.
  • Internet Protocol
    • Logical Addressing
    • Routing
  • Transmission Control Protocol or User Datagram Protocol
    • Sockets and Sessions
  • Domain Name Service (DNS)
    • Host name and IP Address resolution
  • Other services and protocols (such as HTTP which makes the World Wide Web possible)
All networks have several layers of functions stacked on top of each other. Ethernet is used to provide the means to transmit information encoded in electrical signals across copper wiring between two computers. Internet Protocol networking software running on the computers use the Ethernet network to send data back and forth inside IP packets. The Internet Protocol layer provides the means for the computer to connect to the network, obtain a logical address, to learn the logical addresses of other computers and to communicate with the other computers on the network. Internet Protocol provides the basic network functions.
 

Physical Network Topologies

The hardware used to build the network will usually require that the structure of the network conform to a certain design. The word topology is used to describe what the network looks like when drawn on paper and to a large extent, how it operates.
Bus Topology
A bus topology connects all computers together using a single wire, usually a piece of coaxial cable, that passes electricity over a copper core that all devices transmit and receive from. All devices hear all communication over the bus.
Ring Topology
A ring topology usually involves connecting one or more computers together using paired physical interfaces. One interface is the clockwise side of the ring, the other connection is the counter-clockwise side of the ring. Devices connected to the ring can transmit and receive, but there is usually some other sort of method for controlling access to the common network hardware. Token Ring uses a ring topology as does CDDI and FDDI. All three of these network technologies use a token-passing scheme in which the computer holding the the token is allowed to transmit.
Star Topology
A star topology is the most common network topology in use today. All devices in the network are connected to a single hub or repeater. The connected devices radiate outward from the hub like an asterisk '*' or star.
Hub and Spoke Topology
Hub and spoke is another term often used to describe a star topology.
Point to Point Topology (Daisy Chaining)
A point-to-point topology is most often a communications connection between two devices over a single hardware connection that is not shared by any other devices. There will be exactly two and only two devices on the connection. Networks using point-to-point topologies can be daisy-chained together to form an end-to-end communications path.
 
Point to Multipoint
A single connection point on the network has network segments that run to several other points.
 
 

Logical Network Topologies

Peer-to-Peer

A peer-to-peer network is composed of two or more self-sufficient computers. Each computer handles all functions, logging in, storage, providing a user interface etc. The computers on a peer-to-peer network can communicate, but do not need the resources or services available from the other computers on the network. Peer-to-peer is the opposite of the client-server logical network model.
A Microsoft Windows Workgroup is one example of a peer-to-peer network. UNIX servers running as stand-alone systems are also a peer-to-peer network. Logins, services and files are local to the computer. You can only access resources on other peer computers if you have logins on the peer computers.

Client - Server

The simplest client-server network is composed of a server and one or more clients. The server provides a service that the client computer needs. Clients connect to the server across the network in order to access the service. A server can be a piece of software running on a computer, or it can be the computer itself.
One of the simplest examples of client-server is a File Transfer Protocol (FTP) session. File Transfer Protocol (FTP) is a protocol and service that allows your computer to get or put files to a second computer using a network connection. A computer running FTP software opens a session to an FTP server to download or upload a file. The FTP server is providing file storage services over the network. Because it is providing file storage services, it is said to be a 'file server'. A client software application is required to access the FTP service running on the file server.
Most computer networks today control logins on all machines from a centralized logon server. When you sit down to a computer and type in your username and password, your username and password are sent by the computer to the logon server. UNIX servers use NIS, NIS+ or LDAP to provide these login services. Microsoft Windows comptuers use Active Directory and Windows Logon and/or an LDAP client.
Users on a client-server network will usually only need one login to access resources on the network.

Distributed Services

Computer networks using distributed services provide those services to client computers, but not from a centralized server. The services are running on more than one computer and some or all of the functions provided by the service are provided by more than one server.
The simplest example of a distributed service is Domain Name Service (DNS) which performs the function of turning human-understandable domain names into numerical (dotted quad) computer addresses called IP addresses. Whenever you browse a web page, your computer uses DNS. Your computer sends a DNS request to your local DNS server. Your local DNS server will then contact a remote server on the Internet called a "DNS Root Server" to begin the lookup process. This DNS Root Server will then direct your local DNS server to the owner of the domain name the website is a part of. Thus, there are at least three DNS servers involved in the process of finding and providing the IP address of the website you intended to browse. Your local DNS server provides the query functions and asks other servers for information. The Root DNS server tells your local DNS server where to find an answer. The DNS server that 'owns' the domain of the website you are trying to browse tells your local DNS server the correct IP address. Your computer stores that IP address in its own local DNS cache. Thus, DNS is a distributed service that runs everywhere, but no one computer can do the job by itself.

Network Devices

Today's network environment is predominently Ethernet technologies. Ethernet is a broadcast protocol that provides the physical layer and data-link layer functions within a network. To connect devices that use ethernet, you need a hub, bridge, switch or router, and which device you use depends on how you will use the network and the computers.

Hubs

A hub is a device used to create a broadcast domain so that several computers can communicate. Hubs are very inexpensive. Hubs receive frames and broadcast the frame on all ports. Hubs are dying out of existence and the only place you see them today is in extremely small networks, especially in homes. Once there are too many computers connected to a hub, communication begins to break down and a more intelligent solution is required.

Bridges

A bridge is a smarter version of a hub, and performs the same function. A learning bridge can figure out where a given computer is located and transmit frames only on the port connected to that device.

Switches

A switch is a specialized type of learning bridge that can learn which devices are connected to which ports and can forward frames only to those ports that are supposed to hear the transmission. Bridges maintain a forwarding table. Switches are the most common way in which ethernet networks are wired together.

Routers

Routers break up broadcast domains and segment networks, which allow network administrators to control broadcasts and control access to various network resources. Routers provide a means to allow computers to share a logical network that is separate from the physical switched network. Routers are used to connect several ethernet networks together to make a larger network. Routers can further extend the network by connecting local networks to the global network called the "Internet".
Readmore...
Friday, 16 August 2013

Trojan Remover Tool

0 comments
 




Trojan Remover






CLICK TO DOWNLOAD

Readmore...
Thursday, 15 August 2013

Delay in connecting to SQL Server named instance?

0 comments
 
'm having an interesting problem. I've just installed SQL Server 2012 Developer Edition alongside an existing installation of SQL Server 2008 R2 Developer Edition. The original 2008 R2 edition is the default instance, and the new installation is a named instance called \DEV.
So far, so good. To enable remote connections, I had to enable named pipes and TCP/IP for the new instance, plus change the login account for SQL Browser to Local System. I also explicitly opened UDP 1434 on the local firewall.
So, new connections will now take 20sec + to establish a connection to the new instance, but will connect to the old instance (2008 R2) almost immediately. In SQLCMD, I have to override the connection timeout with -l30. In SSMS, the initial connection fails out but subsequent reconnections happen immediately. Connecting with other clients, such as RedGate Backup Pro, shows the same issue - I need to amend the connection timeout to 30 seconds as a minimum. Halving the network packet size from 4096 to 2048 helps too.
I've checked SQL Browser, file details show version is 11.x.x.x. Checked with network team, should be no impediment to TCP/UDP traffic with external firewalls etc (besides, connection from a client in the same subnet has same issue).
Does anyone have any ideas, please? It's infuriating. Thanks in advance

ANSWER.
f you connect to the new instance specifying the port number, i.e. servername,2323 does it connect instantly or does it still take a while? That should help determine if it is the client finding out the port number from the browser service causing the slowness or the instance itself. – steoleary 15 hours ago

Amendment to above, checked connectivity from a server sharing the same IP range, no architecture between them, and connection nearly instant. In response to steoleary - I have connected via the dynamic port from that neighbouring server, instant connection, but from anywhere else I can't connect. Suspect this is because the firewall isn't allowing traffic to the dynamic port. I also now suspect that because this problem only manifests when there's a firewall in the way, the UDP port filtering on the firewall is somehow to blame.
Readmore...

Linux: What programs are accessing the Internet

0 comments
 

So, I am starting to worry a little that something or someone is hacked into my Linux Laptop. I have installed a network Gnome Extension that displays size of bytes going up and down on my Internet connection. My laptop seems to be talking to some program on the internet I don't even know what it could be talking to. There is always some bytes (10 - 50kb every 4 seconds) on the average being received and transmitted. This happens even when I got no applications running on the system like FireFox.
Thinking that my laptop has been hacked, I completely reinstalled my Linux OS and still it is showing that there is always some bytes going up and down the Internet.
I did do the netstat -all command on the terminal but that doesn't really show much and it looks way to cryptic. I want some program like Etherape program. Etherape is too confusing to use.
What do you suggest? I need to know what program is transmitting and receiving bytes on my Linux system.


ANSWER


Using
netstat -an
you will see which ports that are in a connection at the moment.
If you want to see which process that is connected to a certain, port 80 in this case, you can use
lsof -i tcp:80
Well, you need to be root, of course
Readmore...

Can I improve my server response time

0 comments
 
I have the following sample code running on my server. It simply accepts connections, when it reads something it responds immediately:
import socket
import select

def main():
bind = ("0.0.0.0", 28889)
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server_socket.bind(bind)
server_socket.listen(50)
server_socket.setblocking(0)
server_socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

clients = {}

epoll = select.epoll()  # @UndefinedVariable
epoll.register(server_socket.fileno(), select.EPOLLIN)  # @UndefinedVariable

while 1:
    events = epoll.poll(1)
    for (fileno, event) in events:
        if fileno == server_socket.fileno():
            sock, addr = server_socket.accept()
            sock.setblocking(0)
            sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
            fileno = sock.fileno()
            epoll.register(fileno, select.EPOLLIN)  # @UndefinedVariable
            clients[fileno] = sock

        elif event & select.EPOLLIN:  # @UndefinedVariable
            sock = clients[fileno]
            try:
                sock.recv(4096)
                sock.send("~\n")
            except socket.error:
                sock.close()
                del clients[fileno]

        elif event & select.EPOLLHUP:  # @UndefinedVariable
            sock = clients[fileno]
            sock.close()
            del clients[fileno]

if __name__ == "__main__":
main()
I have the following client code which connects to the server and times the response time 10x:
import socket
import time

def main():
sock = socket.socket()
sock.connect(("192.30.35.15", 28889))

for _ in xrange(10):
    start_time = time.time()
    sock.send("~\n")
    sock.recv(2048)
    end_time = time.time()
    print "Ping: %.5f" % (end_time-start_time)


if __name__ == "__main__":
main()
Here are the results I get from running it:
Ping: 0.09100
Ping: 0.11500
Ping: 0.87100
Ping: 0.24400
Ping: 0.49100
Ping: 1.45300
Ping: 0.74800
Ping: 1.59100
Ping: 0.43600
Ping: 0.27100
This seems pretty bad with pings jumping up to 1.5 seconds.
Here's what I get when I ping the server:
Reply from 192.30.35.15: bytes=32 time=83ms
Why is my response time so bad and is there anything I can do to improve it?
Note: This is a cheap rented server, is it the best I can expect? I don't know much about server administration, is there anything I should check?

Answer

Remember, TCP requires a 3-way handshake, plus you're sending 10 round trips of data. What you've created is about the worst case in terms of latency / byte.
Check out your ICMP ping times .. then multiply that by like.. 25. I think you'll see that your application ping times are in line with what you should expect.

Readmore...