RB951G-2HnD - Firewall Configuration for Remote Access
Posted: Wed Jan 22, 2014 12:49 pm
Hello,
I am not a networking guy but pick up things fairly quick and need some of your expertise and guidance to help me make the most of the my RB951G-2HnD router.
I am a home user only and am able to connect to my company via their VPN client, however I noticed today that I do not appear to have their suggested configuration set-up in my firewall even though it is working - will this matter? and if yes, what should I add to my existing configuration?
From the Company info:
I am not a networking guy but pick up things fairly quick and need some of your expertise and guidance to help me make the most of the my RB951G-2HnD router.
I am a home user only and am able to connect to my company via their VPN client, however I noticed today that I do not appear to have their suggested configuration set-up in my firewall even though it is working - will this matter? and if yes, what should I add to my existing configuration?
From the Company info:
My Router Configuration to date:Firewall configuration for remote access
The following ports must be open on your ISP, router and firewall to create a successful VPN connection.
Packet filters for Point-to-Point Tunneling Protocol (PPTP)
TCP destination port of 1723 = PPTP tunnel maintenance traffic
IP Protocol ID of 47 = PPTP tunneled data
Packet filters for Layer Two Tunneling Protocol over Internet Protocol security (L2TP/IPSec)
UDP destination port of 500 = Internet Key Exchange (IKE) traffic
UDP destination port of 1701 = allows L2TP traffic
UDP destination port of 4500 = IPSec network address translator traversal (NAT-T) traffic
[admin@MikroTik] > /export
# jan/22/2014 09:46:54 by RouterOS 6.7
# software id = CCB8-P1HX
#
/interface bridge
add admin-mac=D4:CA:6D:BE:8D:FD auto-mac=no l2mtu=1598 name=bridge-local \
protocol-mode=rstp
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=\
20/40mhz-ht-above disabled=no distance=indoors frequency=2427 l2mtu=2290 \
mode=ap-bridge ssid=MikroTik-BE8E01
/interface ethernet
set [ find default-name=ether1 ] name=ether1-gateway
set [ find default-name=ether2 ] name=ether2-master-local
set [ find default-name=ether3 ] master-port=ether2-master-local name=\
ether3-slave-local
set [ find default-name=ether4 ] master-port=ether2-master-local name=\
ether4-slave-local
set [ find default-name=ether5 ] master-port=ether2-master-local name=\
ether5-slave-local
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1-gateway max-mru=1484 \
max-mtu=1484 name=eircom-pppoe-out1 password=broadband1 use-peer-dns=yes \
user=eircom@eircom.net
/ip neighbor discovery
set wlan1 discover=no
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
group-key-update=59m mode=dynamic-keys wpa-pre-shared-key=REMOVED \
wpa2-pre-shared-key=REMOVED
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
mac-cookie-timeout=3d
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge-local name=default
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
/interface bridge port
add bridge=bridge-local interface=ether2-master-local
add bridge=bridge-local interface=wlan1
/ip address
add address=192.168.88.1/24 comment="default configuration" interface=wlan1 \
network=192.168.88.0
/ip dhcp-client
add comment="default configuration" dhcp-options=hostname,clientid interface=\
ether1-gateway
/ip dhcp-server network
add address=192.168.88.0/24 comment="default configuration" dns-server=\
192.168.88.1 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="Allow ICMP" protocol=icmp
add chain=input comment="Allow WinBox" dst-port=8291 protocol=tcp
add action=add-src-to-address-list address-list=trying_to_rdp \
address-list-timeout=1d chain=input comment="List IP's who try RDP" \
dst-port=3389 protocol=tcp
add action=add-src-to-address-list address-list=trying_to_login \
address-list-timeout=1d chain=input comment=\
"List IP's who try Remote Login" dst-port=20-23 protocol=tcp
add action=drop chain=input comment="Drop ftp brute forcers" dst-port=21 \
protocol=tcp src-address-list=ftp_blacklist
add action=drop chain=input comment="Drop ssh brute forcers" dst-port=22 \
protocol=tcp src-address-list=ssh_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist \
address-list-timeout=1w3d chain=input connection-state=new dst-port=22 \
protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 \
address-list-timeout=1m chain=input connection-state=new dst-port=22 \
protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 \
address-list-timeout=1m chain=input connection-state=new dst-port=22 \
protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 \
address-list-timeout=1m chain=input connection-state=new dst-port=22 \
protocol=tcp
add action=drop chain=input comment="Drop invalid connections" \
connection-state=invalid
add chain=input comment="Allow already established connections" \
connection-state=established
add chain=input comment="Allow related connections " connection-state=related
add action=drop chain=input comment=PPPoE in-interface=eircom-pppoe-out1
add chain=input comment="Allow Lan" in-interface=!ether1-gateway src-address=\
192.168.88.0/24
add action=drop chain=forward comment="Drop ssh brute downstream" dst-port=22 \
protocol=tcp src-address-list=ssh_blacklist
add action=drop chain=forward comment="drop invalid connections" \
connection-state=invalid
add chain=forward comment="Allow already established connections" \
connection-state=established
add chain=forward comment="Allow related connections" connection-state=\
related
add action=drop chain=input comment="Drop everything else"
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=eircom-pppoe-out1 to-addresses=0.0.0.0
/ip service
set api disabled=yes
/ip upnp
set allow-disable-external-interface=no enabled=yes show-dummy-rule=no
/ip upnp interfaces
add interface=bridge-local type=internal
add interface=eircom-pppoe-out1 type=external
/system clock
set time-zone-name=Europe/Dublin
/system leds
set 0 interface=wlan1
/system ntp client
set enabled=yes mode=unicast primary-ntp=134.226.81.3
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
add interface=wlan1
add interface=bridge-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
add interface=wlan1
add interface=bridge-local