bryanoliverh / SDNSecurity_DDOSMitigationDecisionTree_PortBlocking

DDOS Mitigation System based on Ryu SDN Controller with Port Blocking Mechanism
14 stars 2 forks source link

how to run your project #1

Open viettd14 opened 1 year ago

viettd14 commented 1 year ago

Hello Bro, i'm reseach ddos in sdn at my university. Can you write instructions to install and run your project? Thanks,

bryanoliverh commented 1 year ago

Hi,

Good day to you! it is simply by just running the controller job on one end. You can use mininet to create your network topologies and connect to this running controller on another endpoint. Afterward, you can simulate the DDoS attack. The controller has 2 modes (detection and mitigation). The detection mode is just to detect the attacks, but the mitigation mode will both detect and block the attacker switch port.

viettd14 commented 1 year ago

Hi Bryan, I have seen your whole project, It can show your project on web: https://github.com/bryanoliverh/SDNSecurity_RyuControllerApplicationLayer I do not install web. Also, your project has multiple controllers available: controllerfinal.py, controllertest.py, controllerwithstp.py. can i run your controller and topology? Do you have the ova file of this project, can you share it for my reference? Or, you can share me your email, I will contact you?

viettd14 commented 1 year ago

I install django and run the site in the bryanweb directory. Although, the website has run successfully, but I can't perform any function on the web, it response FDCSC Network Manager - Error - ConnectTimeout. I will try run controller by command line: ryu-manager simple_switch_13.py rest_firewall.py And run mininet: sudo python3 threetier9.py, but in can't pingall

bryanoliverh commented 1 year ago

Hi, these controllers have different functions, controllerfinal.py is the main controller. As an alternative, you can use controllerwithstp.py to check functionalities for STP (Spanning Tree Protocol). On the other hand, controllertest.py is just for testing and has no essential functionalities. To run the code, you must run the mininet and the controller together. Mininet acts as the network topology, here you can define using a python file regarding how the topology works. Please read the documentation of Ryu and Mininet first for more information before starting to use this project.

bryanoliverh commented 1 year ago

@viettd14 I have added 2 youtube video links on how to run and simulate this project. You can check to understand more about the purpose of this project. However, I personally encourage you to learn about the basics from the documentation through these two links:

viettd14 commented 1 year ago

@bryanoliverh, Can you guide me run ryu-manager controller with your app web?

viettd14 commented 1 year ago

what is the python version and scikit-learning version you are using

bryanoliverh commented 1 year ago

Hi @viettd14, to run the ryu manager controller with the app web, you first need to ensure that the two devices you are using can communicate within the desired port. In my case, I am using a VM that I run locally with my host machine. The VM runs my mininet topology and the controller. The web app is being run on my Windows host machine. In the Django configuration, I specified the IP of the running controller (it can be the IP of the container, etc depending on the host that runs this controller) so it could read data by hitting the correct API. So, after you make sure that the network devices (in this case it is inside mininet) can communicate to the SDN Controller (RYU), you can run the web app on top of the controller by pointing to the controller host IP.

@bryanoliverh, Can you guide me run ryu-manager controller with your app web?

bryanoliverh commented 1 year ago

what is the python version and scikit-learning version you are using

Hi @viettd14 regarding this, I use Python 3 for the code but did not note the exact version for Python or other libraries as these projects were run on my previous device. However, you can try to run first with your current Python 3 and installed libraries/dependencies.

viettd14 commented 1 year ago

I run controller with python3, error bellow: will@ubuntu:~/project/SDN-DDOS$ ryu-manager controllerfinal.py loading app controllerfinal.py Traceback (most recent call last): File "/usr/local/bin/ryu-manager", line 33, in sys.exit(load_entry_point('ryu==4.34', 'console_scripts', 'ryu-manager')()) File "/usr/local/lib/python3.6/dist-packages/ryu/cmd/manager.py", line 98, in main app_mgr.load_apps(app_lists) File "/usr/local/lib/python3.6/dist-packages/ryu/base/app_manager.py", line 415, in load_apps cls = self.load_app(app_cls_name) File "/usr/local/lib/python3.6/dist-packages/ryu/base/app_manager.py", line 392, in load_app mod = utils.import_module(name) File "/usr/local/lib/python3.6/dist-packages/ryu/utils.py", line 99, in import_module return _import_module_file(modname) File "/usr/local/lib/python3.6/dist-packages/ryu/utils.py", line 88, in _import_module_file return load_source(modname, abspath) File "/usr/local/lib/python3.6/dist-packages/ryu/utils.py", line 42, in load_source return loader.load_module(name) File "", line 399, in _check_name_wrapper File "", line 823, in load_module File "", line 682, in load_module File "", line 265, in _load_module_shim File "", line 684, in _load File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/will/project/SDN-DDOS/controllerfinal.py", line 23, in from svm import SVM ImportError: cannot import name 'SVM'

bryanoliverh commented 1 year ago

hi, @viettd14 Support Vector Machine (SVM) is a Python library that enables various algorithms for regression, classification, etc. This controller is using a classification algorithm which is Decision Tree. Please install the SVM module if you haven't done so.