forked from guillaume.emorine/siotp
		
	Modifié : sisr1/tp07/files_firewall/current_ruleset_partie_4.nft
This commit is contained in:
		| @@ -2,6 +2,11 @@ define netif = enp0s3 | ||||
| define dmzif = enp0s8 | ||||
| define lanif = enp0s9 | ||||
|  | ||||
| define proxy = 10.121.38.1 | ||||
| defiine dns = {10.121.38.7 , 10.121.38.8} | ||||
| define proxyport = 8080 | ||||
| define dmznet = 172.16.0.1-172.16.0.254 | ||||
|  | ||||
| define firewall = 192.168.0.120 | ||||
| define ipdmz = 172.16.0.254 | ||||
| define iplan = 10.0.0.254 | ||||
| @@ -11,13 +16,13 @@ table ip ipfilter{ | ||||
|                 type filter hook prerouting priority filter; policy drop; | ||||
| 		icmp type echo-reply accept | ||||
| 		ct state established, related accept | ||||
| 		icmp type echo-request iif {$lanif} ip daddr 172.16.0.1-172.16.0.254 accept | ||||
| 		icmp type echo-request iif {$lanif} ip daddr $dmznet accept | ||||
| 		icmp type echo-request iif {$lanif} ip daddr {$iplan} accept | ||||
|                 tcp dport 20 accept | ||||
|                 tcp dport 21 accept | ||||
|                 tcp dport {80, 443} accept | ||||
| 		tcp dport 22 accept | ||||
| 		ip saddr 10.121.38.1 tcp dport {80, 443} accept | ||||
| 		ip saddr $proxy tcp dport {80, 443} accept | ||||
|         } | ||||
| 	chain system_in { | ||||
|                 type filter hook input priority filter; policy drop; | ||||
| @@ -28,7 +33,7 @@ table ip ipfilter{ | ||||
|                 tcp dport 21 accept | ||||
|                 tcp dport {80, 443} accept | ||||
|                 tcp dport 22 accept | ||||
| 		ip saddr 10.121.38.1 tcp dport {80, 443} accept | ||||
| 		ip saddr $proxy tcp dport {80, 443} accept | ||||
|         } | ||||
|  	chain routing { | ||||
|                 type filter hook forward priority filter; policy drop; | ||||
| @@ -37,8 +42,8 @@ table ip ipfilter{ | ||||
| 	} | ||||
|  	chain system_out { | ||||
|                 type filter hook output priority filter; policy drop; | ||||
|                 ip daddr 10.121.38.7-10.121.38.8 accept | ||||
|                 ip daddr 10.121.38.1 tcp dport 8080 accept | ||||
|                 ip daddr $dns accept | ||||
|                 ip daddr $proxy tcp dport $proxyport accept | ||||
| 		icmp type echo-reply oif {$lanif} accept | ||||
| 		icmp type echo-request accept | ||||
|                 tcp dport 20 accept | ||||
| @@ -51,8 +56,8 @@ table ip ipfilter{ | ||||
|         } | ||||
| 	chain postrouting { | ||||
|                 type filter hook postrouting priority filter; policy drop; | ||||
| 		ip daddr 10.121.38.7-10.121.38.8 accept | ||||
| 		ip daddr 10.121.38.1 tcp dport 8080 accept | ||||
| 		ip daddr $dns accept | ||||
| 		ip daddr $proxy tcp dport $proxyport accept | ||||
| 		icmp type echo-request ip saddr {$iplan, $ipdmz, $firewall} accept | ||||
| 		icmp type echo-reply iif {$dmzif}  oif {$lanif} accept | ||||
| 		icmp type echo-request iif {$lanif} oif {$dmzif} accept | ||||
|   | ||||
		Reference in New Issue
	
	Block a user