Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. [root@edgepoint-softnix-branch02 ~]# cat /etc/firewalld/direct.xml
  2. <?xml version="1.0" encoding="utf-8"?>
  3. <direct>
  4. <chain table="raw" ipv="ipv4" chain="blocked-by-admin"/>
  5. <rule priority="0" table="mangle" ipv="ipv4" chain="PREROUTING">-p tcp -m tcp --dport 3129 -j DROP</rule>
  6. <rule priority="0" table="mangle" ipv="ipv4" chain="PREROUTING">-p tcp -m tcp --dport 3130 -j DROP</rule>
  7. <rule priority="0" table="mangle" ipv="ipv4" chain="PREROUTING">-p tcp -m tcp --dport 3128 -j DROP</rule>
  8. <rule priority="0" table="raw" ipv="ipv4" chain="blocked-by-admin">-m limit --limit 1/min -j LOG --log-prefix 'blocked-by-admin: '</rule>
  9. <rule priority="1" table="raw" ipv="ipv4" chain="blocked-by-admin">-j DROP</rule>
  10. <rule priority="0" table="nat" ipv="ipv4" chain="PREROUTING">-p tcp -m tcp --dport 3128 -j REJECT</rule>
  11. <rule priority="0" table="raw" ipv="ipv4" chain="PREROUTING">-i tun-portal -s 172.16.1.2 -p tcp --dst www.depa.or.th --dport 25 -m comment --comment comment-msg -j blocked-by-admin</rule>
  12. </direct>
  13. [root@edgepoint-softnix-branch02 ~]# firewall-cmd --direct --permanent --get-all-rules | grep 'blocked-by-admin$'
  14. ipv4 raw PREROUTING 0 -i tun-portal -s 172.16.1.2 -p tcp --dst www.depa.or.th --dport 25 -m comment --comment comment-msg -j blocked-by-admin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement