Community discussions

MikroTik App
 
cwachs
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 84
Joined: Tue Apr 29, 2014 5:55 am

Firewall rule killing PPTP server

Tue Sep 30, 2014 12:54 am

Admission #1: not an expert at firewall rules. Accept my apologies up front since this is likely a dumb question....

Built a list of firewall rules based on the "basic rule set" in the wiki:
/ip firewall filter
add action=drop chain=input comment="Drop Invalid connections" connection-state=invalid
add chain=input comment="Allow Established connections" connection-state=established
add chain=input comment="Allow ICMP" protocol=icmp
add chain=input in-interface=!ether1-WAN src-address=10.9.8.0/24
add chain=input comment="Accept PPTP" connection-type=pptp
add action=drop chain=input comment="Drop everything else" disabled=yes
add action=drop chain=forward comment="drop invalid connections" connection-state=invalid protocol=tcp
add chain=forward comment="Allow established connections" connection-state=established
add chain=forward comment="allow related connections" connection-state=related
add action=drop chain=forward src-address=0.0.0.0/8
add action=drop chain=forward dst-address=0.0.0.0/8
add action=drop chain=forward src-address=127.0.0.0/8
add action=drop chain=forward dst-address=127.0.0.0/8
add action=drop chain=forward src-address=224.0.0.0/3
add action=drop chain=forward dst-address=224.0.0.0/3
add action=jump chain=forward jump-target=tcp protocol=tcp
add action=jump chain=forward jump-target=udp protocol=udp
add action=jump chain=forward jump-target=icmp protocol=icmp
add action=drop chain=tcp comment="deny TFTP" dst-port=69 protocol=tcp
add action=drop chain=tcp comment="deny RPC portmapper" dst-port=111 protocol=tcp
add action=drop chain=tcp comment="deny RPC portmapper" dst-port=135 protocol=tcp
add action=drop chain=tcp comment="deny NBT" dst-port=137-139 protocol=tcp
add action=drop chain=tcp comment="deny cifs" dst-port=445 protocol=tcp
add action=drop chain=tcp comment="deny NFS" dst-port=2049 protocol=tcp
add action=drop chain=tcp comment="deny NetBus" dst-port=12345-12346 protocol=tcp
add action=drop chain=tcp comment="deny NetBus" dst-port=20034 protocol=tcp
add action=drop chain=tcp comment="deny BackOriffice" dst-port=3133 protocol=tcp
add action=drop chain=tcp comment="deny DHCP" dst-port=67-68 protocol=tcp
add action=drop chain=udp comment="deny TFTP" dst-port=69 protocol=udp
add action=drop chain=udp comment="deny PRC portmapper" dst-port=111 protocol=udp
add action=drop chain=udp comment="deny PRC portmapper" dst-port=135 protocol=udp
add action=drop chain=udp comment="deny NBT" dst-port=137-139 protocol=udp
add action=drop chain=udp comment="deny NFS" dst-port=2049 protocol=udp
add action=drop chain=udp comment="deny BackOriffice" dst-port=3133 protocol=udp
add chain=icmp comment="echo reply" icmp-options=0:0 protocol=icmp
add chain=icmp comment="net unreachable" icmp-options=3:0 protocol=icmp
add chain=icmp comment="host unreachable" icmp-options=3:1 protocol=icmp
add chain=icmp comment="host unreachable fragmentation required" icmp-options=3:4 protocol=icmp
add chain=icmp comment="allow source quench" icmp-options=4:0 protocol=icmp
add chain=icmp comment="allow echo request" icmp-options=8:0 protocol=icmp
add chain=icmp comment="allow time exceed" icmp-options=11:0 protocol=icmp
add chain=icmp icmp-options=12:0 protocol=icmp
add action=drop chain=icmp comment="deny all other types"
Works with one exception. I can't access the PPTP VPN server from outside with all these rules active. Its the:
add action=drop chain=input comment="Drop everything else" disabled=yes
that is killing it when I enable that rule. I tried to add an "allow" for PPTP before it but that does not help. I feel like keeping the drop everything else rule off is a bad idea.

What needs to be added or modified to keep this network safe but allow PPTP traffic in (yes, I know about security issues with PPTP but it needs to be on for now)?

Thanks
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: Firewall rule killing PPTP server

Tue Sep 30, 2014 4:52 pm

Permit inbound TCP to port 1723 and permit inbound protocol 47 (GRE). Adjust the rules to reflect your WAN as the in-interface and make sure these rules are above the drop all rule. You can add further selection criteria as appropriate (e.g. src address).

Who is online

Users browsing this forum: damoncze, GoogleOther [Bot], infabo, pama and 114 guests