Hot answers tagged

109

Here's a one-liner I came up with for displaying request and response HTTP headers using tcpdump (which should work for your case too): sudo tcpdump -A -s 10240 'tcp port 4080 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r 's/^...........


50

As it says on the development page for jq "jq is written in C and has no runtime dependencies". So just download the file and put it in place with the following: wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 chmod +x ./jq cp jq /usr/bin


40

Any well-behaved device on an Ethernet LAN is free to ignore nearly any traffic, so PINGs, port scans, and the like are all unreliable. Devices are not, however, free to ignore ARP requests, afaik. Given that you specify you're scanning a local network, I find the least-fragile method of doing what you want is to try to connect to a remote address, then ...


29

As per the recommendation of MadHatter here. I will post my answer here as an addendum to the answers here so that it may be used in conjunction with the answers suggested here. Taken from the following website ## Install yum utils ## yum install yum-utils ## Package-cleanup set count as how many old kernels you want left ## package-cleanup --oldkernels -...


26

yum install -y epel-release yum install -y jq


24

From the TigerVNC manual. man Xvnc -SecurityTypes sec-types Specify which security schemes to use separated by commas. At present only "None" and "VncAuth" are supported. The default is "VncAuth" - note that if you want a server which does not require a password, you must set this parameter to "None". So -SecurityTypes None on the server is the ...


20

Since a device cannot ignore ARP requests, I like to use a tool named arp-scan. It is available in most repositories. When you run the command with the --localnet switch it will give you an overview of your entire internal network. sudo arp-scan --localnet Gives me a list of all IP -and MAC addresses on my network. It is also possible to specify a network ...


17

An alternative is to add the CentOS repository to your yum configs. CentOS is in large part a derivative of RHEL. As such, most of its packages are compatible with RHEL. Michael Cutler wrote a guide for installing CentOS packages on RHEL. Briefly: # find out the release (version) of your RHEL # ex: 5.0, 6.0, 6.3 lsb_release -r cat /etc/issue # create a ...


16

Working on this question in Fedora 20. Have quick diagram of the files involved, as it might be useful to anyone who comes along.


16

jq is in the EPEL repository, which you should already have enabled. Once you have enabled EPEL, you can just yum install jq like everything else.


11

If you don't have the xml for the running vm (eg. after transient migration), you can do virsh dumpxml vm_name > vm_name.xml virsh define vm_name.xml To check: virsh list --all --persistent The VM should now be listed. Or virsh dominfo vm_name There should be a line with 'Persistent: yes'.


11

I don't know which version of nmap you are running in your Red Hat 6.5, but for recent releases, the correct (and faster) way I think it would be: nmap -sn -n 172.16.128.0/25 This will list every host in your network (so, you could use any other IP from that subnet as it should be available). Edit and note: The subnet you mention is 255.255.255.128, but ...


10

Adding to this question for future people who may come across it. If you are putting home directories on an NFS share, you will need to set the correct SELinux context. Assuming your nfs home directory is /nfshome, do the following: [root@host /]# semanage fcontext -a -e /home /nfshome [root@host /]# restorecon -vR /nfshome


8

I had the same issue after installing Gitlab 6.4 on RHEL 6.5. No matter what i did i could not SSH using public keys for the main system user (git). Again the SSH keys were fine, as were the permissions on ~/.ssh (700) an ~/.ssh/authorized_keys (600). The issue was that seliunx was "enforcing" and the contexts in the .ssh directory were wrong, probably ...


8

It's not the voltage regulation that causes the performance problem, but the debugging kernel interrupts that are being triggered by it. Despite some misinformation on Redhat's part, all of the linked pages are referring to the same phenomenon. The voltage regulation happens with or without the Performance profile, likely due to the Turbo Boost feature ...


8

Part 1 -- fping This tool pings everything in the network range specified, and shows those that answer via ICMP. root@thionite:~# fping -a -g 10.28.1.0/24 10.28.1.1 10.28.1.2 10.28.1.3 10.28.1.4 10.28.1.5 10.28.1.12..... Part 2 -- arp Since fping talked with everything on the LAN, that will have caused an entry to be added to the system's ARP table. ...


7

My system works! :) Requeriments: sudo at OPTIONAL: heirloom-mailx (in my case) NOTE: You can use other mail agent and modify the script. Now my configs: mod_evasive (/etc/apache2/mods-enabled/mod-evasive.conf) <IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 10 DOSSiteCount 150 DOSPageInterval 2 ...


7

As of September 2015 there are rsyslog7 packages available in RHEL6. The current version of rsyslog is 8.11, but this one is at least closer to current. To install, you first have to remove your rsyslog package: # rpm -e --nodeps rsyslog # yum -y install rsyslog7


7

Here's how I fixed the issue, at least temporarily. I copied the /etc/yum.repos.d/redhat.repo file from another working rhel6 server. Then I replaced all of the instances of sslclientkey and sslclientcert with the .pem files on this server. Then I renamed the .repo file to avoid it being wiped out on update. By doing that, I am able to install all packages ...


7

Actually, the command string listed in the sudoers is requiring to be the exact match. In your example, you put the command string /usr/bin/yum update in the sudoers configuration line, but the command you finally executes is yum -y update. (the difference is the extra parameter -y). Then, the mismatch in command string caused the sudoers failed to hit ...


7

find / -mount -type f -ls will list all files like with an output similar to ls -dils. find / -mount -type f -printf "%s %h/%f\n" will just print the size and the name. The -mount (or -xdev) option tells find to not descend into other mounted file systems (which / usually has at least a few of) and type -f makes sure only files and not directories ...


7

In ldif syntax leading spaces are line wrapping markers. You are trying to add a dn of ou=People, dc=my_domain, dc=com ou: People objectclass: organizationalUnit with no attributes. dn: ou=People,dc=my_domain,dc=com ou: People objectclass: organizationalUnit dn: ou=Group,dc=my_domain,dc=com ou: Group objectclass: organizationalUnit


7

You should not need to build your own curl version, support for TLS 1.1 & 1.2 (with the --tlsv1.1 resp. --tlsv1.2 commandline switches) has been backported and became available in 2014 from curl version 7.19.7-43 of the RHEL 6 rpm package. Please read this Q&A how version numbers for software stay the same in Red Hat major releases, despite the ...


7

Are you aware that you type 4122 in the example? You should try -L *:4420:172.88.3.31:22 The star implies that you listen on all addresses, and not localhost, which you cannot connect to from other machines. You can also bind to a specific IP, but my guess is that * is what you want.


6

No, it does not. If it's not running, it's merely a file in the file system. If an attacker manages to restart your system with this kernel, he has already full control over the system anyway.


6

Yes, Red Hat backports security fixes and important bug fixes to all packages they offer in their repositories until the EOL of that particular RHEL version. New major features or drastic changes are not appearing in RHEL updates.


6

VMware tools, as installed via the vSphere client, will build against the currently-running kernel, not the latest kernel on the server. If using a support OS (like RHEL6), you should avoid this entirely and use the VMware Operating System Specific Packages (OSPs), as they're managed via your package manager and can be updated independently of your ESXi ...


6

Red Hat requires a subscription to make use of their repositories, meaning you need to join their developer program or pay for a subscription. If you don't actually need Red Hat specifically (or a service contract), you might instead try CentOS. It's pretty much the same thing as RHEL except with slightly slower updates, a few different default ...


6

I found this link here which says SMB 2 and 3 is not supported for rhel and Centos 6. It can only mount SMB1. From Centos and rhel 7 this is supported.


5

Make sure there isn't an external firewall between the machine and the rest of the internet. If there is, request that the people administering the firewall open port 123.


Only top voted, non community-wiki answers of a minimum length are eligible