How to create DHCP server and a policy in the Fortigate

Here is an example script that demonstrates how to use the  fortigate-api  package to create a DHCP server and a policy in the Fortigate   from fortigate_api import FortigateAPI # Create a FortigateAPI object fgt = FortigateAPI(host="host", username="username", password="password") # Create a DHCP server data = {     "default-gateway": "192.168.255.1",     "netmask": "255.255.255.0",     "interface": "vlan.123",     "ip-range": [         {"start-ip": "192.168.255.2", "end-ip": "192.168.255.254",}     ], } fgt.dhcp_server.create(data) # Create a policy in the Fortigate data = dict(     name="POLICY",     status="enable",     action="accept",     srcintf=[{"name": "any"}],     dstintf=[{"name": "any"}],     srcaddr=[{"name": "all"}],     dstaddr=[{"name&quo

how to prevent Wi-Fi from hackers||how to do Mac filter in router

How To Prevent Wireless Attack By Hackers|| Mac-Filtering Of Wi-Fi   

The following steps are available to do Mac-Filtering:-

Step 1: Open your cmd or command prompt by using the windows button and the 'R' run box will open in front now just you have to type cmd and press enter.

RUN-BOX



Step 2: After opening CMD or command prompt type 'ipconfig/all there you will get all information related to your network say IP address, subnets mask default gateway, etc. If you are using a normal LAN connection, you must type just this command 'ipconfig'.

IPCONFIG COMMAND



Step 3: Now you have to search for the default gateway and copy it or note it down somewhere.

DEFAULT GATEWAY



Step 4: Now open any of your browsers and paste or type the default gateway there and press enter you will see your router login panel.

INPUT THE DG IN THE BROWSER ADDRESS BAR



Step 5: Now enter the user name and by default if you are using the TP-Link router just enter login username: admin password: admin for any other router please refer to the following link:- Default password of all Routers.
ROUTER LOGIN PANEL



Step 6: Now you have to click on wireless and then in the drop-down menu click on Wireless Mac-Filter and Add the mac Address of the devices you want to connect with your wifi.

WIRELESS MAC-FILTERING



Step 7: Now open your device which you want to connect with wifi and in your WiFi settings find your wifi Mac Address and put it down somewhere or add directly to your router and save it.

THESE STEPS ARE FOR MOBILE/TABLET DEVICES:-

STEP 1

STEP 2

STEP 3 FOR
FOR ANY DESKTOP/LAPTOP FOLLOWING STEPS:-

GETMAC

IPCONFIG

IPCONFIG/ALL OUTPUT 




Step 8: After adding all the MAC addresses, you can save and then reboot your router in the tools.

ADD ALL THE DEVICES MAC AND SAVE



Now no one else will be able to connect to your router except whom you allow and you are free of beginning crack by the router.

Comments

Popular posts from this blog

How to Configure VXLAN in FortiGate Firewall

Higher Availability in FortiGate and VRRP in Cisco

Python Script to take the Backup of Multiple device in a Network