Skip to content

Instantly share code, notes, and snippets.

View vulongtran's full-sized avatar

Vu Long Tran vulongtran

View GitHub Profile
@vulongtran
vulongtran / clients.conf
Created August 14, 2021 13:29
FreeRadius default config file /etc/raddb/clients.conf with less comments
## clients.conf -- client configuration directives
#######################################################################
client localhost {
ipaddr = 127.0.0.1
proto = *
secret = testing123
require_message_authenticator = no
nas_type = other # localhost isn't usually a NAS...
limit {
max_connections = 16
@vulongtran
vulongtran / clients.conf
Last active August 14, 2021 13:25
FreeRadius default config file /etc/raddb/clients.conf
# -*- text -*-
##
## clients.conf -- client configuration directives
##
## $Id: 76b300d3c55f1c5c052ddf289b76bf28ac3a370bbb2 $
#######################################################################
#
# Define RADIUS clients (usually a NAS, Access Point, etc.).
@vulongtran
vulongtran / users
Last active August 14, 2021 11:58
FreeRADIUS default users config file /etc/raddb/users
#
# Configuration file for the rlm_files module.
# Please see rlm_files(5) manpage for more information.
#
# This file contains authentication security and configuration
# information for each user. Accounting requests are NOT processed
# through this file. Instead, see 'accounting', in this directory.
#
# The first field is the user's name and can be up to
# 253 characters in length. This is followed (on the same line) with
@vulongtran
vulongtran / timesync.ps1
Created November 9, 2020 12:32
timesync.ps1 script for Bolt Workshop
echo "Reconfiguring W32Time..."
w32tm /config /syncfromflags:MANUAL /manualpeerlist:"0.nl.pool.ntp.org 1.nl.pool.ntp.org" /update
echo ""
echo "Resyncing clock..."
w32tm /resync
echo ""
echo "Current time source:"
w32tm /query /source
echo ""
echo "All configured time sources:"
@vulongtran
vulongtran / inventory.yaml
Last active November 18, 2020 08:00
inventory.yaml for Virtual Bolt Workshop
# change the target name and number when you use this Inventory.yaml report.
groups:
- name: linux
config:
transport: ssh
ssh:
user: centos
run-as: root
private-key: "./student.pem"
host-key-check: false
"""Make sure you are in the scripts folder"""
"""To change to this folder type cd ~/scripts """
"""This is for the network.py file"""
#!/usr/bin/env python3
import requests
import socket
localhost = socket.gethostbyname('localhost')
request = requests.get("http://www.google.com")