1
vote
1answer
72 views

ip route add works manually but throws “Error: an inet prefix is expected rather than …” when run via bash script

I'm trying to run a script that should add this route to a table 11: ip route add local 10.1.3.212 dev eth1 proto kernel scope host src 10.1.3.212 table 11 If I run this command manually, it is ...
1
vote
0answers
60 views

Is there an open source implementation of RFC 2544? [closed]

I've built an open source implementation of RFC 2544 in bash and writing a report on my work I've been asked to list other open source implementations of this RFC. I've searched on Google, on code ...
0
votes
2answers
108 views

How to use the new ifdown and ifup?

I would like to change the MAC address on a Fedora 2o webserver, but it seams that ifdown and ifup doesn't work like they used too before systemd were introduced. This is what I would like to do ...
1
vote
1answer
75 views

What is the Linux command to get the current PPTP ip address?

I have a Linux script that allows me to route some traffic through a VPN interface, and other traffic (from different IP) through another interface. This is my script: echo "ip route del default via ...
0
votes
1answer
114 views

How can I measure the cumulative network usage of a process, from execution beginning to end

I want to measure how much bandwidth git pull uses, preferably by prefixing git command with desired program, i.e. nettally git pull Alternatively, is there some sneaky way to accumulate nethogs / ...
-1
votes
2answers
163 views

how I can get the value of JAVA_HOME from my client

I have nagios client and server, how I can get the value of JAVA_HOME from my client? I have use to set shell command in script that is running from remote host: echo $JAVA_HOME and printenv | grep ...
-1
votes
2answers
115 views

Monitor port status in Linux [closed]

I want to monitor the list of used ports in linux system. I want to make a script that can run an alert when a new port is up or down. For example when the port 8080 is up , i get an alert: this port ...
2
votes
1answer
400 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 file ...
2
votes
2answers
113 views

Can I use IPs assigned to virtual network interfaces in a bash script?

I'm wondering if it's possible to dynamically read in the IP addresses of network interfaces for use in a bash script. Something like: #!/bin/bash MYPUBLICIP= get_eth0_address MYPRIVATEIP= ...
2
votes
3answers
133 views

Remove IP with ip command in linux

If I add two IPs like this: ip addr add 1.1.1.1/24 dev eth2 ip addr add 1.1.1.2/24 dev eth2 and then I try to delete one of like this: ip addr del 1.1.1.2/24 dev eth2 BOTH IPs will be deleted ...
0
votes
1answer
204 views

is it possible to provide variable arguments to xinetd service?

I have created a bash script to listen on specific port (using xinetd), so whenever there is someone connecting to port, then it invokes the script and provides its output to user. But i need to ...
0
votes
1answer
548 views

Curl authentication

I am trying to download a file with cURL from a password protected directory on my site. It is not working. Instead of the downloading the requested file, it downloads a HTML file that says, ...
3
votes
2answers
1k views

Test if an IP is being used in an internal network without using nmap

I can perform port scan using nmap to test if a given IP is being used, e.g. nmap -PR 192.168.1.9 However, nmap is not installed in most server, is it possible to have the same result (e.g. check ...
2
votes
1answer
271 views

Disable networked tab completion with bash

Networked applications like rsync and scp can tab complete when they are enabled with bash. But what if you want local tab completion without remote tab completion? Is it possible?
6
votes
3answers
5k views

iftop - how to generate text file with its output?

iftop is great tool to view almost live bandwidth usage distinguished by source-ip source-port destination-ip destination port. I'm using it to see which client's ip is using most bandwidth. Now I ...
-1
votes
1answer
395 views

shell script to replace subnet mask and default GW

I need to create a shell script the gets as first parameter a subnet mask and as the second paramater a GW address. something like this: "replace_IPs.sh 255.255.0.0. 10.0.0.254" by running this ...
0
votes
1answer
403 views

Automate wifi connection in bash using glob

Trying to apply these rationals on an ubuntu VM box to automate wifi connections but processing just into an infinite loop as I guess I'm not using glob as it should but can't find why/where the ...
0
votes
2answers
406 views

Need a bash script to replace static IP with a new IP address

I would like to have a bash script for Centos machine. I want the script to show me the current IP Address /subnet mask / Default GW. and give me option to enter a new IP Address /subnet Mask / ...
0
votes
2answers
329 views

What are the skills required for a deployment engineer for network monitoring product company?

What comes in deployment scripts. Or what are things to keep in mind while writing one. Is bash powerful enough or you would recommend perl/python? Keeping Network Monitoring in mind, if you have ...
2
votes
4answers
2k views

Bash snippet to see if something is listening on a port?

I want to see if something is listening on a port on localhost. I was going to use nc and check the exit code. Something like this: echo "" | nc localhost 14881 echo $? Any other suggestions?