วันพุธที่ 22 พฤศจิกายน พ.ศ. 2560

Blocking Client ROUTER Access

Blocking Client ROUTER Access


ttl
As requested by a virtual friend, who have a small network in a rural area with lower amount of bandwidth, & he wanted to block access to client who are using WIFI / Client ROUTER and doing sharing with other members. For this reason the operator is loosing ‘POTENTIAL’ customers. Following trick worked like a charm in order to block client router access.
At your main router, add following rule,
1
2
/ip firewall mangle
add action=change-ttl chain=forward comment="Block Client NAT/Router  / zaib" disabled=no in-interface=LAN new-ttl=set:1 passthrough=no
The above rule will decrement the TTL by value 1 . This way when the packet will move towards client router, it will not go beyond that point to client. BUT if the client uses normal PC, he will be able to access the internet.
1- block client router
DISCLAIMER:
Do remember one point, the above method is not 100%. There are always workaround for about anything. None of any security is 100% fool proof.
If client uses Mikrotik Router, he can create another mangle rule which can increment TTL value then above restrictions will be useless.Something like following
1
/ip firewall mangle add action=change-ttl chain=prerouting in-interface=WAN new-ttl=increment:1
lolz
But you can create a script that can keep tracking of another mikrotik box on your network by mikrotik discovery protocol, as only very few admins secure there Mikrotik Router at full extent by blocking discovery, change winbox default ports, block any access on WAN port etc etc.
Happy Fire-walling !!! Jz

วันพุธที่ 1 พฤศจิกายน พ.ศ. 2560

How to remove subscription notification from Proxmox VE 5

How to remove subscription notification from Proxmox VE 5

This guide will show you how to easily remove the “No Valid Subscription” nag from Proxmox VE 5.* that pops up every time you log in.

Introduction and Disclaimer

In order to apply this “hack” to a Proxmox installation, you require SSH or console access with administrative/sudo privileges. This guide assumes that you have the appropriate privileges. (If you’re reading this guide then, let’s face it, you probably do).
By following this guide you agree that you do so at your own risk. I take no responsibility for any damage that occurs as a result of this guide.

Steps

1) Log in to your Proxmox machine via SSH or via the VNC console available from within the web UI.
2) Navigate to the following directory where the PVE manager configuration files are stored
/usr/share/pve-manager/js/
3) Make a backup of the Javascript file pvemanagerlib.js
cp pvemanagerlib.js pvemanagerlib.js.bkp
4) Now open the file you just backed up with your favourite editor and find the following lines of code:
if (data.status === 'Active') {
    Ext.Msg.show({
      title: gettext('No valid subscription'),
      icon: Ext.Msg.WARNING,
      msg: PVE.Utils.noSubKeyHtml,
      buttons: Ext.Msg.OK,
      callback: function(btn) {
          if (btn !== 'ok') {
              return;
          }
          orig_cmd();
      }
    });
} else {
    orig_cmd();
}
5) Replace the first if() string with if(false), like so:
if (false) {
    Ext.Msg.show({
      title: gettext('No valid subscription'),
      icon: Ext.Msg.WARNING,
      msg: PVE.Utils.noSubKeyHtml,
      buttons: Ext.Msg.OK,
      callback: function(btn) {
          if (btn !== 'ok') {
              return;
          }
          orig_cmd();
      }
    });
} else {
    orig_cmd();
}
6) Restart the node – make sure you shut down your running VMs properly first!
7) Navigate back to your web UI (log out first if you’re still logged in) and hard refresh your browser. Log back in, no more nag! Do note that this may be overwritten by subsequent updates. If you update your machine and the nag returns simply follow this guide again.