Posts

FortiGate REST API

To generate a API token: execute api-user generate-key <API_user> eg. execute api-user generate-key api  Static route info: curl -k -H --"Authorization: Bearer <generated_token>" "https://192.168.0.108/api/v2/cmdb/router/static?access_token=<generated_token>" eg.  curl -k -H --"Authorization: Bearer x04gmtfknwk386pctdpn98rkNchjcx" "https://192.168.0.108/api/v2/cmdb/router/static?access_token=x04gmtfknwk386pctdpn98rkNchjcx" Global configuration: curl -k -H --"Authorization: Bearer x04gmtfknwk386pctdpn98rkNchjcx" "https://192.168.0.108/api/v2/cmdb/system/global?access_token=x04gmtfknwk386pctdpn98rkNchjcx" Address Group: curl -k -H --"Authorization: Bearer x04gmtfknwk386pctdpn98rkNchjcx" "https://192.168.0.108/api/v2/cmdb/firewall/addrgrp?access_token=x04gmtfknwk386pctdpn98rkNchjcx" Policy with serial number 1: curl -k -H --"Authorization: Bearer x04gmtfknwk386pctdpn98rkNchjcx" ...

How to Implement and Test SSL Decryption (PaloAlto)

Image
 How to Implement and Test SSL Decryption (PaloAlto)

SD-WAN Configuration with dynamic WAN interface (DHCP client)

Image
SD-WAN Configuration with dynamic WAN interface (DHCP client) 

Configure IPsec site-to-site VPN in Linux Machine

Image
 Configure IPsec site-to-site VPN in Linux Machine: Update the system and install the package  apt update && sudo apt upgrade -y  apt install strongswan -y Check if the following kernel parameter is set or not sysctl net.ipv4.ip_forward=1 To list all configured parameters: sysctl -a root@ubuntu-server-main:~# sysctl net.ipv4.ip_forward=1 net.ipv4.ip_forward = 1 root@ubuntu-server-main:~# sysctl net.ipv4.conf.all.accept_redirects=0 net.ipv4.conf.all.accept_redirects = 0 root@ubuntu-server-main:~# sysctl net.ipv4.conf.all.send_redirects=0 net.ipv4.conf.all.send_redirects = 0 root@ubuntu-server-main:~# Network Diagram: IPsec Config: Configure the PSK and update the VPN endpoints ++++++++++++++ cat /etc/ipsec.secrets # source      destination 192.168.0.2   192.168.0.108 : PSK "87zRQqylaoeF5I8o4lRhwvmUzf+pYdDpsCOlesIeFA/2xrtxKXJTbCPZgqplnXgPX5uprL+aRgxD8ua7MmdWaQ" ++++++++++++++ cat /etc/ipsec.conf: config setup         ch...

Reverse Proxy in PFsense Firewall

Image
 Reverse Proxy in PFsense Firewall: Network Diagram:

TACACS+ Installation on Linux [CentOS]

 TACACS+  Installation on CentOS: In the example below I will show you how to install tac_plus on a CentOS server. There’s a RPM available so this will save you the hassle of compiling the source code yourself. Let’s add the repository first: [root@server ~]# cd /etc/yum.repos.d/ [root@server yum.repos.d]# vim nux-misc.repo We will create a new repository file where we can grab tac_plus. This is what you should enter: [nux-misc] name=Nux Misc baseurl=http://li.nux.ro/download/nux/misc/el6/x86_64/ enabled=0 gpgcheck=1 gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro Save the file and install tac_plus with the following command: [root@server ~]# yum --enablerepo=nux-misc install tac_plus That’s all you need to do. All configuration is done from a single config file. Let’s take a look at its contents: [root@server /]# vim /etc/tac_plus.conf You will see a lot of things in this default configuration file. Let me walk you through some of the fields. The first thing you see ...

TACACS+ integration with Fortigate Firewall

1. Add the TACACS+ server to the FortiGate using the following commands on the CLI: config user tacacs+     edit <server name>         set authorization enable         set server <server ip>         set key <server key>         set authen-type chap     next end The auto config doesn't work with TACACS+ so y ou have to set the authentication type as "chap". You'll find the server key in the configuration file of your TACACS+ server. 2. Create a user group and add the server as a member: config user group     edit <tacacs+ group name>         set member <server name>     next end With this method, any user who has an account on the remote server can authenticate. Note:  Another method would be to create TACACS+ user account...