Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [networking]

Managing and using network connectivity on a unix system

322
votes
4answers
216k 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 ...
117
votes
4answers
239k 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 (...
23
votes
4answers
75k views

Output traffic on different interfaces based on destination port

My question is basically the same as Only allow certain outbound traffic on certain interfaces. I have two interfaces eth1 (10.0.0.2) and wlan0 (192.168.0.2). My default route is for eth1. Let's say ...
69
votes
10answers
35k views

Block network access of a process?

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

Can't access select https sites on Linux over PPPoE

My internet connection used to be a direct LAN connection to my provider. Back then, everything would load fine on both Windows and Ubuntu (dual boot). However, a while ago they started needing me to ...
50
votes
2answers
48k views

Why is my ethernet interface called enp0s10 instead of eth0?

When I run ifconfig -a, I only get lo and enp0s10 interfaces, not the classical eth0 What does enp0s10 mean? Why is there no eth0?
60
votes
20answers
108k 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?
125
votes
2answers
135k views

Good detailed explanation of /etc/network/interfaces syntax?

I understood the very basic concept of how to use /etc/network/interfaces, but all I find online are examples, example after example, which I can copy-paste from. What I miss is an explanation of the ...
369
votes
24answers
519k views

How can I resolve a hostname to an IP address in a Bash script?

What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using Arch Linux.
256
votes
16answers
779k views

How do I set my DNS when resolv.conf is being overwritten?

Most of the info I see online says to edit /etc/resolv.conf, but any changes I make there just get overridden. $ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by ...
42
votes
5answers
41k 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 ...
50
votes
10answers
118k views

CentOS no network interface after installation in VirtualBox

I have Ubuntu 12.10 on which I installed virtual box on which I setup Centos 6.4 i386. On Ubuntu I have: 3.5.0-17-generic kernel running. On virtual box I install Centos 6.4 and everything works fine,...
71
votes
8answers
427k views

Connecting to wifi network through command line

I am trying to connect to my WEP network just using the command-line (Linux). I run: sudo iwconfig wlan0 mode Managed essid 'my_network' key 'xx:xx:... hex key, 26 digits' Then I try to obtain an ...
127
votes
2answers
408k views

ifconfig command not found

I've just installed CentOS7 as a virtual machine on my mac (osx10.9.3 + virtualbox) .Running ifconfig returns command not found. Also running sudo /sbin/ifconfig returns commmand not found. I am root. ...
109
votes
20answers
24k views

What is the fastest way to send massive amounts of data between two computers? [closed]

This is a situation I am frequently in: I have a source server with a 320GB hard-drive inside of it, and 16GB of ram (exact specs available here, but as this is an issue I run into frequently on ...
61
votes
2answers
133k views

How can I create a virtual ethernet interface on a machine without a physical adapter?

I have a Dell XPS 13 ultrabook which has a wifi nic, but no physical ethernet nic (wlan0, but no eth0). I need to create a virtual adapter for using Vagrant with NFS, but am finding that the typical ...
22
votes
6answers
81k views

How can I change the default “ens33” network device to old “eth0” on Fedora 19?

I've just installed a Fedora 19 on VMware workstation 9. The default network device is "ens33" instead of "eth0" on RHEL. The reason I have to use "eth0" is that the license component of one of our ...
7
votes
4answers
8k views

All commands that should be used to connect to wifi in command line

I would like to switch from gnome to awesome and I would like to connect my wifi network in command line (instead of using gnome tools). So, I searched on the internet and found approximatively the ...
22
votes
5answers
34k views

Why does SCP hang on copying files larger than 1405 bytes? [duplicate]

I'm trying to copy a file from one of my local machines to a remote machine. Copying a file with size upto 1405 bytes works fine. When I try to scp a larger file, the file gets copied but the scp ...
2
votes
1answer
375 views

lxterminal in the netstat output

Can you explain the following lines in the netstat output? Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path unix 2 [ ] STREAM ...
2
votes
3answers
1k views

How can I ssh to a remote server with an automated password and no key?

I have a remote server. I planned to use public keys to connect over ssh without typing the password but the remote system rejects public key authentication. So what is the best way to do it? What ...
59
votes
6answers
102k views

Allowing a user to let listen to a port below 1024

I need to allow a user (different from root) to run a server listening on port 80. Is there any way to do this?
42
votes
7answers
34k 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 ...
40
votes
3answers
46k views

Is there an easy way to programmatically extract IP address? [duplicate]

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 ...
13
votes
3answers
23k views

Only allow certain outbound traffic on certain interfaces

I have rather an odd issue. I have a server with two network interfaces eth0 and eth1. Each are connected to a different network. Each network has a internet gateway. The server has various outbound ...
42
votes
4answers
178k 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 ...
14
votes
2answers
42k views

Two interfaces, two addresses, two gateways?

I have a system that has two network interfaces with different IP adresses, both of which are in the public address range (albeit via NAT in the case of the first one) and both of which have different ...
31
votes
4answers
40k 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 ...
9
votes
1answer
3k views

Dual network connection

I have a usb cellular modem and a Home LAN connection on my Ubuntu 10.10 box. Both work independently. I want to know how to have both connected at the same time, and be able to specify which ...
8
votes
4answers
59k views

How can I restart a network interface?

How can I restart a network interface? I have a vm that doesn't update its IP address correctly when switching between home and work. The vm runs Ubuntu server and uses a bridged network adapter.
3
votes
1answer
3k views

Is that possible for debian users to connect to network through systemd-networkd?

Systemd offers the ability to manage the network by itself without additional tools such as netctl or NetworkManager. I am running debian 8 and i need to configure my network using systemd-networkd ...
13
votes
4answers
27k views

Include domain name or not in /etc/hosts?

I am setting up a VMWare cluster of CentOS nodes. Is it best practice to include a domain name after the machine? What are the potential problems of leaving it out? Does a domain complicate ...
6
votes
1answer
37k views

How To Diagnose Faulty (onboard) Network Adapter

I'm looking for advice on diagnosing ethernet connectivity issues under Linux. I suspect it's a hardware issue, though I am not entirely sure. It's an nVidia chipset and ethernet adapter. The device ...
6
votes
9answers
14k views

File /etc/resolv.conf deleted on every reboot, why or what?

I am having an issue where DHCP (I though as I read in other similar topics) is clearing the /etc/resolv.conf file on each boot. I am not sure about how to deal with this since the post I have found (...
3
votes
2answers
4k views

Editing my /etc/hosts.deny

I'm being trolled by China, and don't know why I can't block their request to my server. //host.deny ALL: item.taobao.com ALL: 117.25.128.* But when I watch the error log on my webserver tail -f /...
-1
votes
1answer
4k views

no wifi adapter detected by Bodhi

Installed bodhi-4.5.0-64 onto a 2008 Macbook, 4.1 and am not seeing wireless options. Do I need to install something from apt first in order for Bodhi to pick up the built-in wifi adapter? The "...
70
votes
3answers
98k views

Linux network troubleshooting and debugging

From time to time Linux and Unix users faced with various network problems. Many of these problems are presented here and at some others troubleshooting forums, but they are very concrete and contains ...
218
votes
12answers
579k 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)
70
votes
6answers
148k views

How to limit network bandwidth?

We are hosting an application on remote server. We need to test it with a limited network bandwidth (for users with bad Internet access). Can I limit my internet bandwidth? For instance: 128 KB per ...
26
votes
4answers
54k 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.
42
votes
2answers
50k views

How to identify a process which has no pid?

I have a process which listen to 2 ports : 45136/tcp and 37208/udp (actually I assume it is the same process). But netstat doesn't return any pid : netstat -antlp | grep 45136 tcp 0 0 0.0....
14
votes
2answers
23k views

How can I use Linux as a Gateway?

NOTE: If client devices (computer B in this example) want to obtain internet through the gateway computer, maybe they still need to configure nameserver resolution. This is not explained here (a ...
27
votes
2answers
2k views

ip vs ifconfig commands pros and cons

At some point, in some teaching material (from Linux Foundation) on Linux that I came across, the following is mentioned: ip command is more versatile and more efficient than ifconfig because it ...
18
votes
2answers
34k views

rsync certain files, excluding the rest, ignoring .svn/ directory, recursively

I'm using rsync to copy some files from a share to another. Recursively, I need to: Delete files at destination that were removed from the origin Only sync .php and .js files Exclude every other ...
17
votes
6answers
67k views

What overwrites /etc/resolv.conf on every boot?

I was given the files for a mini linux, that boots directly into firefox. It works for all it should be doing, only that I do not get an internet connection. We have 3 DNS servers in the network, ...
12
votes
3answers
19k views

Debian - how to run a script on startup as soon as there is an internet connection ready for use?

I am running Debian 7 Wheezy and I need to start some screens on startup as soon as there is a fully functional internet connection. However, not, if the internet connection broke and was connected ...
11
votes
2answers
22k views

wlan number assignment

How or where does Linux determine the assignment of a network device? Specifically, wlan0 or wlan1 for wireless USB devices. I plugged in a TP USB wireless a while ago, and it was assigned wlan0. I ...
17
votes
10answers
3k views

Simple file transfer

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

What can I use to monitor and log incoming/outgoing traffic to/from remote hosts?

I run a web server (Debian Squeeze on a VPS), and the graphs provided by the hosting company show consistently that around twice as much traffic is incoming to the server compared to the outgoing ...
8
votes
1answer
7k views

How to diagnose a reliably unreliable connection?

Where I'm living now, the internet connection (wired) shows the following weird symptoms. They seem to be independent of whether I use host names or IP addresses. Pinging works Skype works Wget ...