Wednesday, November 11, 2020

OracleCloud vpn to fortigate

 Here we have a vpn and bgp cfg to a fortigate device.


FGT100E   6.4.3

oracle cloud ashbun


The fgt vpn-ipsec cfg;







 So use the wizard and define your tunnel0interface inside address and the CPE peer-ipv4 address ( aka your fortinet wan ) 



The oraclecloud will dump a simple cfg summary if you follow the wizard make sure to record all details. Similar to the following;





The dashboard will update when you have ipsec and bgp UP.





Make sure to monitor the fortigate for bgp connectivity and ipsec-vpn details;





Ken Felix 
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Monday, November 9, 2020

Understand Juniper SRX self-traffic-policy

Any traffic origination to the SRX is controlled by a policy that is hidden. This policy is known as a self-traffic-policy   which means we originate or terminate the traffic to it's self.

e.g 

   A ssh to a SRX and BGP session




You can get a complete count of the self-traffic-policy via the policy #1




You do not need to enable this policy, when you enable a service the self-traffic-policy is enabled.


 



Ken Felix 
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Friday, October 30, 2020

HOWTO: lock out users from fortios

 FortiOS does not have a direct mean for disabling an administrator account. 


So if you want to be config exclusive and prevent others from gaining access, you have to use a readonly or a accessprofile with nothing allowed.


Take this user ansible and the accprofile assigned;





So if this user does login to the fortigate,  he will be limited to executing NO commands


e.g 




Ken Felix 
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Friday, October 9, 2020

HOWTO: debug bgp on fortios

 BGP configuration seems difficult but in reality it's a  simple routing protocol. To proper debug  bgp on fortios you need to do a few primary actions.


To test layer2/3 connection ;

x.x.x.x == the remote -bgp speaker

    execute ping x.x.x.x

You probably want to set ping-options and the source

To verify tcp.port 179 is open,

   execute telnet x.x.x.x 179 

 Next, you can enable bgp protocol debug options





It's wise to set level to info and if you have numerous bgp peers you might have a lot of information. For a new turn up that's giving you issues, use "diag ip router bgp all enable"  for example.


Most bgp issues always fall back on typo( wrong peer, wrong AS,etc...) or layer2/3 issue. Keep in mind if you have filters, tcp.port destination 179 needs to be allowed in and out.

If you do get a ESTABLISHMENT and then the session dies, that could be a maximum-received prefix limits reach and the bgp-session tcp-reset when this happens.






Ken Felix 
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Friday, October 2, 2020

Fortios Ansible plugins

 



FTNT has a list of quite a few plugins that can be configured via ansible. A lot of the low level configuration can be done with in a CM tool like ansible. FortiManager is also a good alternative that's documented and supported by FTNT.

https://docs.ansible.com/ansible/latest/collections/fortinet/fortios/index.html

https://www.fortinet.com/products/management/fortimanager



The key things to look at, you need to be running the latest python version natively or in a python virtenv. In any RHEL  distro you can't really delete python2 per-se since  "yum" is py2 only.

If you haveboth  py2/3 you have to ensure ansible is set for version 3 if you want the best results.

extra things to considers

  • ANSIBLE_DEBUG=1 for any issues and use -vvv for extra verbosity. 
  • You are only limited by your imagination and what the limits of the plugins. 
  • You should study the FTNT developer network documents


Ken Felix 

NSE ( network security expert) and Route/Switching Engineer Protecting networks
kfelix  -----a----t---- socpuppets ---dot---com

     ^      ^
=(  @  @ )=
         o

        /  \



Wednesday, September 2, 2020

Howto download the junos pkg install file directly to the SRXappliance

 You can use  curl to download the junos kg directly from junos-softdownloads. You need to 1st find your software and gather the download link



click the "copy" button to get the full https link URLK. You will need this for curl

Next, just use the cli "curl" with the -o <filename> option to download the file via the link



If you have a local proxy and if the firewall is not directly attached to the internet make sure to use the -x proxy option with curl and provide the details for the proxy.


example


curl -o junospkg.tgz   -x 192.0.1.1:8081  -U kfelix:mypassword  -k "https:<download link>





Ken Felix 
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \


Tuesday, September 1, 2020

howto set ssh public-key ansible and fortios

 In this post I will demo how to create an account and set the ssh-public-key. The key must be escaped before the string "" 

example:


      \" \"


Here's the play ;



And after execution, you will find the ssh-pub-key set for the name admin account





Ken Felix 
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \