Skip to content

Instantly share code, notes, and snippets.

@smijar
smijar / centos7-eth0-steps.snippets
Last active December 10, 2021 02:32
Steps on how to rename Centos 7 ethnxxxx interface to eth0
centos 7 setup-rename NIC to eth0
http://ask.xmodulo.com/change-network-interface-name-centos7.html
- This is achieved by editing /etc/default/grub and adding "net.ifnames=0" to GRUB_CMDLINE_LINUX variable.
- Then run this command to regenerate GRUB configuration with updated kernel parameters.
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
- cat /sys/class/net/*/address
@smijar
smijar / TestSSLClientMutualAuth.java
Last active December 22, 2021 06:04
Test SSL Client in java using mutual authentication.
import java.io.File;
import java.io.FileInputStream;
import java.io.StringWriter;
import java.security.KeyStore;
import javax.net.ssl.SSLContext;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;