libpcap is used for package capturing. As I understand, it can capture the network packages from all ports. And it can capture the package data in link layer (such as ethernet frame). This looks a little confusing to me, because it seems impossible to intercept all network traffic (from all ports) by just using the socket API in Unix-like system.
Tag: networking
How to get the URL or IP of a load balancer from DNS of a website?
nslookup is a network administration command-line tool available for many computer operating systems for querying the Domain Name System (DNS) to obtain domain name or IP address mapping or for any other specific DNS record. So, nslookup returns the endpoint(s) of a url. But if I needs to get the intermediate url/ip, how do I do so? For eg. If
Get Subnet mask in Linux using bash
I am using bash to get the IP address of my machine with that script: And now I am trying to get the Subnet Mask in this type: But I have no idea how can I do that. Answer there are couple of ways to achieve this: first: to print the mask in format 255.255.255.0, you can use this: second:
Linux: Port Isolation on a Bridge to use OLSR correctly
On a router running OLSR there are four ports/interfaces where connected devices talk OLSR to each other. Now i dont like to use an IP address for each interface but instead bridge them all and set just one IP address on the bridge. The problem now is, those devices should NOT see each other on layer2, else olsr routing changes
Simulate VPN connection in docker
I want to simulate a VPN traffic on my machine. I’ve set up VPN server which runs inside a docker image. I can successfully log in. The problem is that the docker image is running on my machine on the default docker’s bridge – docker0. There is no change if I do connect to machine using VPN or not. It
ip route add by specifying source address in the same network
I have 4 pc´s and another pc, call it proxy, all being in the same network: 172.16.96.0/20 . I can ping between each other. But, I want to separate them into 2. That is: pc1 is directly connected to pc2 pc3 is directly connected to pc4 But, all traffic from pc1 or pc2 to pc3 or pc4 has to go
Bash Array not accepting WildCard
I have an Array that I have setup in a bash script. My goal is to ping through a particular port on a a server with many network interfaces. For example the ping -I eth3 172.26.0.1 command to force ping through eth3 When I setup a bash Array I can get code to work if I call the Elements (ports)
How does netstat determine symbolic hostname?
I was trying to understand what the –numeric/-n flag of netstat does? Manual says the following about –numeric/-n –numeric , -n Show numerical addresses instead of trying to determine symbolic host, port or user names. Following is a line of output with “-n” option Following is the same line as in A but without “-n” option port 8080 in my
How to add a name to namespace?
As I know, I can use the “clone” to create a process and a namespace, but the namespace created in this way has no name. For example, I create a network namespace with the parameter: CLONE_NEWNS, but in the command “ip netns list”, there is no namespace list because the namespace created has no name. But I can use the
DHClient override renewal time
My ubuntu machine is receiving a renewal time of 7000 seconds from the DNS server. I want to change this on the ubuntu machine to be longer via the dhclient.conf. I can’t change the dhcp sever. However all the examples I try don’t seem to be the correct syntax. For instance if I add at the top of the .conf