You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,15 @@
1
-
<h2>Description:</h2>
1
+
## Description:
2
2
PHPFirewall is a tool to allow/block connections to your web resource using IP address. The IP address details are either retrieved from local database or by making API calls to IP2Location.io
3
3
4
-
<h2>Code Example:</h2>
4
+
## Why this project?
5
+
Internet is ever growing. New devices are coming online everyday which requires the ISPs to add new network range into their system. This makes it quite difficult for firewalls like Cisco or pfsense (linux) to manage policies or know about all networks that are introduced by the ISP of a particular region. Most network hacking happens because of incorrect/failed firewall rules. It's just hard to know all of the network IP ranges of a region.
5
6
7
+
I wanted to create a firewall application that can be installed on shared hosting, that does not require physical access to the hardware or require a dedicated hardware to run. PHPFirewall can run in a shared hosting environment like Cpanel and it will work just fine. Most Cpanel providers provide access to the users space via SSH, so managing the firewall via CLI is possible.
8
+
9
+
The whole idea is not to worry about which IP belongs to which part of the world. 1 line should be enough to allow connection from that region and the firewall should take care of the rest of the connections by blocking them.
10
+
Ip2location.io API along with this application - PHPFirewall, makes this possible.
11
+
12
+
## Code Example:
6
13
```php
7
14
//In index.php
8
15
<?php
@@ -19,11 +26,11 @@ if (!(new \PHPFirewall\Firewall)->checkIp()) {
19
26
// Rest of your code
20
27
```
21
28
22
-
<h2>Documentation:</h2>
29
+
## Documentation:
23
30
24
31
[Documentation for this repository](https://github.com/oyeaussie/PHPFirewall/wiki/1.-Description)
25
32
26
-
<h2>Credits:</h2>
33
+
## Credits:
27
34
Thanks to the following projects for their great work. Without them, this project would not be possible.<br>
28
35
29
36
Composer<br>
@@ -39,17 +46,17 @@ Carbon Date : https://carbon.nesbot.com/<br>
39
46
Codeception : https://codeception.com/<br>
40
47
PHPUnit : https://phpunit.de/<br>
41
48
42
-
<h2>Issues/Discussions/New features:</h2>
49
+
## Issues/Discussions/New features:
43
50
Feel free to open an issue in case of a bug or to discuss anything related to the tool or to add a new feature.
44
51
45
-
<h2>Buy Me A Coffee/Beer:</h2>
52
+
## Buy Me A Coffee/Beer:
46
53
Time is valuable. If you feel this project has been helpful and it has saved your time worth a coffee or a beer...<br><br>
47
54
<ahref="https://www.buymeacoffee.com/oyeaussie"target="_blank"><imgsrc="https://github.com/oyeaussie/assets/blob/main/buymecoffee.jpg"alt="Buy Me A Coffee"></a>
48
55
<ahref="https://github.com/sponsors/oyeaussie?frequency=one-time&sponsor=oyeaussie&amount=10"target="_blank"><imgsrc="https://github.com/oyeaussie/assets/blob/main/buymebeer.jpg"alt="Buy Me A Beer"></a>
49
56
50
-
<h2>Hire me:</h2>
57
+
## Hire me:
51
58
If you would like to develop a PHP application that requires expert level programming. I am available for hire. Message me and we can discuss further.
0 commit comments