Reputation
7,893
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 16 28
Newest
 Yearling
Impact
~1.1m people reached

  • 0 posts edited
  • 1 helpful flag
  • 491 votes cast
Nov
9
comment Why are incoming packets on a TAP interface seen with tcpdump but not with iptables?
if you run tcpdump with -p, can tcpdump still see the packets? (-p restricts tcpdump from putting the interface in promiscuous mode.) Since iptables doesn't put the interface into promiscuous mode, you'll get a closer comparison to what iptables sees.
Nov
9
revised How to get netmask from bash?
fixed the last printf
Nov
9
comment Can't login as root even after resetting the password
and if possible, take periodic backups of your vms. that allows you to directly compare a problematic VM with the last known good iteration of the same VM, as well as providing a way to restore service. and, @Gilles, thanks for the pointer to etckeeper. I'm definitely going to take a look at that.
Nov
8
comment Why are incoming packets on a TAP interface seen with tcpdump but not with iptables?
-m physdev is usually used with bridges and tap interfaces. i know you're not trying to bridge the tap interface to your eth, but I'm wondering if using the physdev to match the interface somehow changes the traffic to make it visible? I have no idea if it will work, or change anything, though.
Nov
8
answered How to get netmask from bash?
Nov
8
comment Why are incoming packets on a TAP interface seen with tcpdump but not with iptables?
maybe try using physdev matching iptables and see if that changes how you're seeing the traffic. iptables -A INPUT -p udp --dport 67 -m physdev --physdev-in tap+ -j LOG --log-level 4 --log-prefix "[in=tap0] "
Nov
8
answered Bash - Continuous String Manipulation
Nov
8
comment Writing a shell script to take output of an executable and perform some calculation
you'll have to use a 3rd party command like bc or something to do it, as bash cannot innately handle floats. or you could use Perl to write your script.
Nov
8
comment Return only the portion of a line after a matching pattern
similar to unix.stackexchange.com/questions/24089/… as well.
Nov
7
answered How to configure Linux to use DHCP or static IP depending on presence/absence of DHCP server?
Nov
7
comment crontab “0/15” minutes + “11-15” hour field: when does that end?
ah. that extra field makes all the difference. your application would then run, every 15 minutes, on the zero second, from 11:00 to 15:45, every mon-friday.
Nov
7
answered crontab “0/15” minutes + “11-15” hour field: when does that end?
Nov
7
comment Returning only the portion of a line after a matching pattern
I have updated my example to specifically include the space after the colon following Result: . This will now ignore lines like that in your example, and more closely match the initial request of the OP.
Nov
7
revised Returning only the portion of a line after a matching pattern
updated to include a space after the :.
Nov
7
revised Writing a shell script to take output of an executable and perform some calculation
added 361 characters in body
Nov
7
answered Writing a shell script to take output of an executable and perform some calculation
Nov
7
comment Returning only the portion of a line after a matching pattern
the OP doesn't mention a second colon. Just that the string ocurring between Result: and the next space are what is desired. Awk will by default break up the line on white space. $1 = "Result:", $2 = the next word. Which is what the OP requested to extract.
Nov
7
answered Find out if a session is running under `su`
Nov
7
answered Returning only the portion of a line after a matching pattern
Nov
4
comment How do I exit a script in a conditional statement?
@GarrettHall this is identical to the one liner that is in the previous answer. The only different between a one-liner, and a multi-line answer, is formatting.