Skip to content

Instantly share code, notes, and snippets.

@ssgtcookie
Created August 27, 2018 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssgtcookie/af9a9518a9de6d5f74c41d0b09511496 to your computer and use it in GitHub Desktop.
Save ssgtcookie/af9a9518a9de6d5f74c41d0b09511496 to your computer and use it in GitHub Desktop.
Splunk bash installation script for ipv6 only
#!/bin/bash
# Download and install Splunk
wget https://download.splunk.com/products/splunk/releases/7.1.2/linux/splunk-7.1.2-a0c72a66db66-linux-2.6-amd64.deb
sudo dpkg -i splunk-7.1.2-a0c72a66db66-linux-2.6-amd64.deb
sudo /opt/splunk/bin/splunk enable boot-start
sudo service splunk start
# Configure Splunk to work with ipv6 only
echo 'listenOnIPv6=only' >> /opt/splunk/etc/system/local/server.conf
cp /opt/splunk/etc/system/default/web.conf /opt/splunk/etc/system/local/web.conf
sed -i -e 's/127.0.0.1/[::1]/g' /opt/splunk/etc/system/local/web.conf
sed -i -e 's/listenOnIPv6 = no/listenOnIPv6 = only/g' /opt/splunk/etc/system/local/web.conf
sudo service splunk restart
# List all open ports
sudo netstat -tulpn
echo "Script finished"
@ssgtcookie
Copy link
Author

Or use the default webconf file (even better) https://docs.splunk.com/Documentation/Splunk/7.1.2/Admin/Webconf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment