Skip to content

Tag: networking

Bash parse output in route command

I am writing a bash script to register the remote hosts in a wireless network. I am getting the remote IPs, but I need help to parse the output. Here’s my output: I need to get these IPs and insert into a command like … <remote_ip_1> … How can it be done? I couldn’t find this cas…

Receive (recv) full request (e.g. curl HTTP)

How should this be done? I want to receive a (rather long) HTTP request and cannot get this to work. The problem: Without flags, recv does not read the whole message. I guess this is normal behavior. From what I understand using the MSG_WAITALL flag causes it to block until everything is received. However, in…

linux ip routing with multiple uplinks SINGLE interface

trying to setup a Proxmox machine that is running 3 vms. it has 3 public ips but these ips are on a single interface (eth0). the 3 vms are on a bridge (vmbr0) with an address of 172.16.0.1/24 I have enable ip masquerading and forwarding. but I cannot figure out how to make each of the 3 vms (172.16.0.2, 172.1…

Curl returned ststus 6 (DNS name bad address error)

I am unable to resolve host names when one(3g-cell) of my two interfaces is turned on. One interface is WAN(Ethernet), while the other is 3g-Cell. When WAN is turned off, I tried to do manual curl request and I was able to do it using 3g-cell interface, but was unable to do that using hostname. (same happened…