Managing and using network connectivity on a unix system

learn more… | top users | synonyms (1)

39
votes
4answers
23k views

How does reverse SSH tunneling work?

As I understand this, firewalls (assuming default settings) deny all incoming traffic that has no prior corresponding outgoing traffic. Based on Reversing an ssh connection and SSH Tunneling Made ...
36
votes
2answers
4k views

How does SSH connection survive a network restart?

From a Linux SSH shell, type /etc/init.d/network restart to restart the network service. I expect my SSH connection to die since the network service goes down. But it doesn't. Very cool. But how does ...
26
votes
10answers
45k views

Streaming to an Apple TV (3) from Linux

Alright, here is the setup: One apple tv 3 in the living room, connected to the network (wired). One pc running Linux (Arch Linux x64, AMD), containing all music, movies and series (wired). Now I ...
25
votes
2answers
2k views

Can TCP provide more than 65535 ports?

Is it possible to setup a Linux system so that it provides more than 65,535 ports? The intent would be to have more than 65k daemons listening on a given system. Clearly there are ports being used ...
24
votes
1answer
615 views

Why does it take up to several minutes to clean a listening TCP port after a program dies?

If I kill a program that is listening on a TCP port, it takes up to several minutes until the port is reclaimed by the system and usable again. I've seen several Q/A mentioning this phenomenon, but ...
20
votes
4answers
12k views

How to speed up X over SSH on a slow network connection?

Are there any specific recommendations on speeding up X applications over ssh on a slow network connection? In this specific case, I am accessing a server located in west coast from a laptop in east ...
18
votes
4answers
30k views

How to make a machine accessible from the LAN using its hostname

Here are details of the machine I want to access using its hostname: $ hostname hostname $ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 hostname.company.local hostname It's a default Debian 6 ...
17
votes
5answers
27k views

Determining what process is bound to a port

I know that using the command: lsof -i TCP (or some variant of parameters with lsof) I can determine which process is bound to a particular port. This is useful say if I'm trying to start ...
17
votes
1answer
8k views

Why are the first 1024 ports restricted to the root user only?

This is more idle curiosity than anything else. A friend of mine asked me 'which port range is it that only root can use under Linux?' I told him 0-1024 were restricted. Then he asked my why it was so ...
17
votes
2answers
11k views

how to check rx ring, max_backlog, and max_syn_backlog size

Quite often in the course of troubleshooting and tuning things I find myself thinking about the following Linux kernel settings: net.core.netdev_max_backlog net.ipv4.tcp_max_syn_backlog ...
16
votes
6answers
16k views

Linux: allowing an user to listen to a port below 1024

I need to allow an user (different from root) to run a server listening on port 80. Is there any way to do this?
16
votes
3answers
7k views

Throttle the download speed of wget or curl while downloading

Is it possible to throttle (limit) the download speed of wget or curl ? Is it possible to change the throttle value while it is downloading ?
16
votes
2answers
1k views

Is there an easy way to programmatically extract IP address?

Is there an easy way to programmatically extract IP address, without tedious parsing of ifconfig? I would not mind simple command output processing using sed to do it but not processing multiline ...
16
votes
5answers
5k views

What is the need for rsync server in daemon mode

I don't understand the need for an rsync server in daemon mode. What are the benefits from it if I can use rsync with SSH or telnet?
15
votes
4answers
19k views

What DNS servers am I using?

How can I check which DNS server am I using (in Linux)? I am using network manager and a wired connection to my university's LAN. (I am trying to find out why my domain doesn't get resolved)
15
votes
5answers
27k views

How to limit network bandwidth?

Problem: We are hosting an application on remote server. We need to test it with a limited network bandwidth (for users with bad Internet access). Question: Can I limit my internet bandwidth (in ...
15
votes
6answers
10k views

How to get my own IP address and save it to a variable in a shell script?

How can I get my own IP address and save it to a variable in a shell script?
15
votes
4answers
11k views

On-the-fly monitoring HTTP requests on a network interface?

For debugging purposes I want to monitor the http requests on a network interface. Using a naive tcpdump command line I get too much low-level information and the information I need is not very ...
15
votes
3answers
623 views

Limiting a specific shell's internet bandwidth usage

I want update my linux in one shell but by default wget or axel in updater use all the bandwidth. How can I limit the speed in this shell? I want other shells to have a fair share, and to limit ...
15
votes
2answers
2k views

What is a socket?

Could someone explain to me what a socket is? I see it in many acronyms in context of SSL, etc. Also, why is it called a socket? Is it purely because it was what a name they invented? Or was it the ...
14
votes
9answers
792 views

Simple file transfer

Given two Linux boxes on a LAN, what's the simplest way to transfer files between them?
14
votes
9answers
48k views

Cannot enable network after CentOS 6.3 fresh install

I am trying to perform a fresh CentOS 6.3 installation then run various yum commands such as yum install httpd. The installation runs fine, however I cannot run any network based commands like yum I ...
14
votes
5answers
9k views

Sending audio through network

This is a rather crazy idea. I am planing to set up a configuration that would send audio being played on my laptop to my home server via local network so that the sound is played on the server ...
14
votes
4answers
900 views

TCP dies on a Linux laptop

Once in several days I have the following problem. My laptop (Debian testing) suddenly becomes unable to work with TCP connections to the internet. The following things continue working fine: UDP ...
14
votes
1answer
751 views

“ss” command in iproute package; why query slab table for timewait sockets?

Forgive me if this isn't the best forum for this question, but it seems more relevant to the kernel than to the programming itself. I'm writing a script that queries the system for open ports so that ...
13
votes
5answers
11k views

How can I limit the bandwidth used by a process?

I have a CentOS 5.7 server that will be backing up its files nightly. I am concerned that visitors to the various sites that the server hosts will experience degraded performance while the backup is ...
13
votes
5answers
4k views

What is using this network socket?

I'm trying to use NTP to update the time on my machine. However, it gives me an error: host # ntpdate ntp1.example.org 10 Aug 12:38:50 ntpdate[7696]: the NTP socket is in use, exiting What does the ...
13
votes
3answers
16k views

Can't ifdown eth0 (main interface)

I can't ifdown an interface on a Debian 6.0.5 box; user@box:/etc/network$ sudo ifdown eth0 && sudo ifup eth0 ifdown: interface eth0 not configured SIOCADDRT: File exists Failed to bring up ...
13
votes
3answers
8k views

How to find what other machines are connected to the local network

How can I see a list of all machines that are available on the LAN I'm am part of.
13
votes
7answers
8k views

Faster way than ping for checking if computer online?

I'm writing a wake on lan script for a set of our lab computers. We have sqlite db with a list of the computer hostnames, IPs, and MACs and currently I ping each of them with '-c1' so it doesn't run ...
13
votes
5answers
35k views

How to change the order of the network cards (eth1 <-> eth0) on linux

Is there any way to swap network interfaces (eth1 <-> eth0) after system installation. My brand new Debian 6.0 install assigned PCI network card as "eth0" and motherboards integrated network ...
12
votes
1answer
1k views

Why is my TCP throughput much greater than UDP throughput?

I haven't done anything unusual to my hardware or kernel configurations (all default settings, fresh OS install, Linux kernel 3.11 TCP/IP stack) and I'm averaging about 3.83 million messages per ...
12
votes
3answers
23k views

Why the default eth0 interface is down by default on CentOS?

I am already a little bit familiar with Linux distros like Debian or Ubuntu (yeah, very similar) but I wanted to try Red Hat based - CentOS 6.2 . I have installed it on my Windows 7 host in virtualBox ...
12
votes
3answers
1k views

Can I limit a user (and their apps) to one network interface?

As the title really. I've actually got two scenarios to apply this: Multiseat Desktop: two network connections both with internet gateways and two accounts doing bandwidth-intensive tasks on each. I ...
12
votes
1answer
500 views

Command to run a child process “offline” (no external network) on Linux

I have a program I would like to test in offline mode without taking down my actual network. This program would still need to connect to local sockets, including unix domain sockets and loopback. It ...
12
votes
1answer
22k views

FreeBSD: How to fix “ping: sendto: No buffer space available”?

I'm trying to ping a remote host, but I get an error. # ping 192.168.80.1 PING 192.168.80.1 (192.168.80.1): 56 data bytes ping: sendto: No buffer space available ping: sendto: No buffer space ...
11
votes
4answers
521 views

How am I supposed to edit files on a network with Vim?

Currently I'm doing it by SSHing into a server, and executing Vim on the server. This has the benefit of not having to deal with cumbersome syntax of opening files from a remote server over SCP, and, ...
11
votes
4answers
2k views

Why do we need a firewall if no programs are running on your ports?

When I try to telnet to a port on a server, and if there is no program listening on that port telnet dies with a "Unable to connect ... " error. I understand that. But, why do we need a firewall if ...
11
votes
4answers
3k views

How to give HTTP traffic higher priority?

When I surf the web, I find that I have to pause my BitTorrent client, to help improve the painfully slow speed (I'm sadly on a 384kbps line). It's not too nice to have to do this manually every time. ...
11
votes
4answers
2k views

Block network access of a process?

Is it possible to block the (outgoing) network access of a single process?
11
votes
2answers
18k views

CentOS eth0 not starting

Why would my new CentOS Virtual Machine not start eth0 on startup? I have to start it manually every time. How can I fix this? Thanks.
11
votes
4answers
5k views

Can I create a virtual ethernet interface named eth0?

This is a rather odd question, because normally it would not make sense to do that. I am running Arch based on the Linux 3.10.5-1 kernel. The system uses the new de-facto naming conventions of ...
11
votes
4answers
1k views

How can I find which process sends data to a specific port?

I have a service, keeping a certain port open. I'm getting data to it, that I neither expect nor want to get, and I'm trying to pin-point the source of this data. So how can I find which process that ...
11
votes
4answers
493 views

Is there a top-like command that shows the network bandwidths and file accesses of running processes

For example, we'd like to see: PROCESS IF TX RX FILE(regular) R/W prog1 eth0 200kB/s 12kB/s -- -- wlan0 12kB/s 100kB/s -- ...
10
votes
7answers
3k views

What are some common tools for intrusion detection?

Please give a brief description for each tool.
10
votes
2answers
355 views

Linux program to look into what you're downloading

Is there a linux program that allows you to look into your current download traffic? Something that can list all the addresses I am currently connected to and downloading from.
10
votes
2answers
1k views

How to open a port early in boot process to unlock LUKS via SSH

I have a fully encrypted server running Debian 7 and have set up dropbear and busybox to unlock the LUKS container via SSH (as described in this tutorial and in this U&L answer). Unfortunately, ...
9
votes
4answers
5k views

How to recover a shell after a disconnection

Am doing some work on a remote centos 5.6 machine and my network keeps dropping. Is there a way i can recover my hung sessions after i reconnect? EDIT: am doing some updating and installing with yum ...
9
votes
2answers
634 views

How to make traceroute trace beyond 30 hops?

Some of the servers I use traceroute on, are more than 30 hops away. How do I make traceroute trace beyond 30 hops?
9
votes
3answers
9k views

Does mount always require root privileges?

I was under the impression that any sort of call to mount requires root privileges. But recently I was told "You should instead create appropriate entries in /etc/fstab so that the filesystems can be ...