
                    <!-- مدال اضافه ترافیک -->
                    <div class="modal fade" id="overBandwidthModal" tabindex="-1" aria-labelledby="overBandwidthModalLabel" aria-hidden="true">
                        <div class="modal-dialog modal-dialog-centered">
                            <div class="modal-content text-end" style="direction: rtl;">
                                <div class="modal-header">
                                    <h5 class="modal-title" id="overBandwidthModalLabel">فعال‌سازی اضافه ترافیک</h5>
                                    <button type="button" class="btn-close ms-0" data-bs-dismiss="modal" aria-label="بستن"></button>
                                </div>
                                <div class="modal-body">
                                    <div class="alert alert-warning text-center mb-2" style="direction: rtl;">
                                        این امکان در دست توسعه است.<br>
                                        با آپدیت بعدی اضافه خواهد شد.
                                    </div>
                                </div>
                                <div class="modal-footer justify-content-end">
                                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">بستن</button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <script>
                    function OverBandwidth() {
                        let modal = new bootstrap.Modal(document.getElementById('overBandwidthModal'));
                        modal.show();
                    }
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- Firewall Rules Modal -->
<div class="modal fade" id="firewall-rules" tabindex="-1" aria-labelledby="firewallRulesLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="firewallRulesLabel">
          <i class="ri-shield-cross-line"></i> Firewall Rules
        </h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body" style="direction:ltr;">
        <div class="row g-3">
          <div class="col-xxl-12">
            <p>Please follow these instructions to enable the firewall on your server:</p>
            <ol>
              <li>Login to your server via Putty or any other software.</li>
              <li class="mb-2">Basic instructions to block all connections to the server and allow the necessary ones</li>
             <pre class="bg-dark text-white rounded-3 px-3 py-2 mb-3" style="font-size:90%;overflow-x:auto;direction:ltr;">
# Reset UFW to default

sudo ufw reset

# Set default policies to deny all incoming and outgoing traffic

sudo ufw default deny incoming
sudo ufw default deny outgoing

# Allow essential web traffic

sudo ufw allow in 80/tcp  # HTTP
sudo ufw allow out 80/tcp
sudo ufw allow in 443/tcp  # HTTPS
sudo ufw allow out 443/tcp

# Allow SSH

sudo ufw allow in 22/tcp  # SSH
sudo ufw allow out 22/tcp

# Enable UFW

sudo ufw enable
              </pre>

              <li class="mt-2">You can allow any port you want with this command. Let's say you changed your SSH port to 2233, then you should allow it</li>
             <pre class="bg-dark text-white rounded-3 px-3 py-2 mb-3" style="font-size:90%;overflow-x:auto;direction:ltr;">
sudo ufw allow in 2233/tcp
              </pre>

              <li class="mb-2">If you're using a VPN service and want to allow the most important ports</li>
            <pre class="bg-dark text-white rounded-3 px-3 py-2 mb-3" style="font-size:90%;overflow-x:auto;">
# Allow WhatsApp, Telegram, and Facebook Messenger, etc.

sudo ufw allow in 5222/tcp
sudo ufw allow out 5222/tcp
sudo ufw allow in 3478/udp
sudo ufw allow out 3478/udp
sudo ufw allow in 3479/udp
sudo ufw allow out 3479/udp
sudo ufw allow in 45395/udp
sudo ufw allow out 45395/udp
sudo ufw allow in 50318/udp
sudo ufw allow out 50318/udp
sudo ufw allow in 59234/udp
sudo ufw allow out 59234/udp
sudo ufw allow in 5223/tcp
sudo ufw allow out 5223/tcp
sudo ufw allow in 843/tcp
sudo ufw allow out 843/tcp
sudo ufw allow in 5000/udp
sudo ufw allow out 5000/udp
sudo ufw allow in 5001/udp
sudo ufw allow out 5001/udp
              </pre>

              <li class="mb-2 mt-2">The most important command to avoid Network/Port scan, block these IP ranges:</li>
               <pre class="bg-dark text-white rounded-3 px-3 py-2 mb-3" style="font-size:90%;overflow-x:auto;">
# Block the IP ranges to avoid port scans

sudo ufw deny in from 10.0.0.0/8
sudo ufw deny out to 10.0.0.0/8
sudo ufw deny in from 172.0.0.0/8
sudo ufw deny out to 172.0.0.0/8
sudo ufw deny in from 192.0.0.0/8
sudo ufw deny out to 192.0.0.0/8
sudo ufw deny in from 102.0.0.0/8
sudo ufw deny out to 102.0.0.0/8
sudo ufw deny in from 168.0.0.0/8
sudo ufw deny out to 168.0.0.0/8
            </pre>

              <li class="mb-2 mt-2">To block email ports to avoid SPAM, it's very important</li>
               <pre class="bg-dark text-white rounded-3 px-3 py-2 mb-3" style="font-size:90%;overflow-x:auto;">
sudo ufw deny in 25
sudo ufw deny out 25
sudo ufw deny in 465
sudo ufw deny out 465
sudo ufw deny in 587
sudo ufw deny out 587
           </pre>
            </ol>
          </div>
          <div class="col-lg-12">
            <div class="hstack gap-2 justify-content-end">
              <button type="button" class="btn btn-light" data-bs-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- Modal کنسول -->
<div class="modal fade" id="vncModal" tabindex="-1" aria-labelledby="vncModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-xl" style="max-width:90vw;">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="vncModalLabel">کنسول سرور</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="بستن"></button>
      </div>
      <div class="modal-body" style="height:80vh;">
        <iframe id="vnc-frame" style="width:100%; height:100%; border:0;" loading="lazy"></iframe>
      </div>
    </div>
  </div>
</div>

<?php /**PATH /home/cloud/public_html/laravel-project/resources/views/servers/partials/modals.blade.php ENDPATH**/ ?>