Pages

Tuesday, March 6, 2012

P2--Some tcp/udp ports drop using Mikrotik firewall fillter rule.

Create rule and deny some tcp ports in it:

TCP PORTS
Code: [Select]
/ip firewall filter
add chain=tcp protocol=tcp dst-port=69 action=drop \
  comment="deny TFTP" 
add chain=tcp protocol=tcp dst-port=111 action=drop \
  comment="deny RPC portmapper"  
add chain=tcp protocol=tcp dst-port=135 action=drop \
  comment="deny RPC portmapper"  
add chain=tcp protocol=tcp dst-port=137-139 action=drop \
  comment="deny NBT"  
add chain=tcp protocol=tcp dst-port=445 action=drop \
  comment="deny cifs"  
add chain=tcp protocol=tcp dst-port=2049 action=drop comment="deny NFS"  
add chain=tcp protocol=tcp dst-port=12345-12346 action=drop comment="deny NetBus"  
add chain=tcp protocol=tcp dst-port=20034 action=drop comment="deny NetBus"  
add chain=tcp protocol=tcp dst-port=3133 action=drop comment="deny BackOriffice"  
add chain=tcp protocol=tcp dst-port=67-68 action=drop comment="deny DHCP" 

UDP PORTS:
Code: [Select]
/ip firewall filter
add chain=udp protocol=udp dst-port=69 action=drop comment="deny TFTP"  
add chain=udp protocol=udp dst-port=111 action=drop comment="deny PRC portmapper"  
add chain=udp protocol=udp dst-port=135 action=drop comment="deny PRC portmapper"  
add chain=udp protocol=udp dst-port=137-139 action=drop comment="deny NBT"  
add chain=udp protocol=udp dst-port=2049 action=drop comment="deny NFS"  
add chain=udp protocol=udp dst-port=3133 action=drop comment="deny BackOriffice"  

P1--PPTP Server and user configure in Mikrotik.

Example Diagram:




Enable PPTP server:

Code: [Select]
[admin@MikroTik] interface pptp-server server> set enabled=yes
[admin@MikroTik] interface pptp-server server> print
            enabled: yes
            max-mtu: 1460
            max-mru: 1460
               mrru: disabled
     authentication: mschap2,mschap1
  keepalive-timeout: 30
    default-profile: default
[admin@MikroTik] interface pptp-server server>


Create PPTP user :

Code: [Select]
[admin@RemoteOffice] /ppp secret> add name=uzzal service=pptp password=1234
local-address=10.1.101.1 remote-address=10.1.101.100
[admin@RemoteOffice] /ppp secret> print detail
Flags: X - disabled
  0   name="Laptop" service=pptp caller-id="" password="123" profile=default
      local-address=10.1.101.1 remote-address=10.1.101.100 routes==""

[admin@RemoteOffice] /ppp secret>

Then you can connect PPTP server using PPTP client