How to Connect your Home Network to xDSL Line?
Description
You have your Home DSL modem installed, and want to have a secure connection
to the Internet for your home network. For that, you have to install MikroTik
router between the DSL modem and your home network:

Follow the steps below to connect your home network to xDSL line:
- Make your MikroTik router with two Ethernet NICs, one for the Home DSL
modem, one for your home network. See instructions in the Basic Setup Guide.
- When installing, make sure you install the dhcp software package.
-
Enable both interfaces, for example: /interface enable ether1,ether2
-
Configure DHCP client on the external (xDSL) interface to receive IP
configuration form your service provider: /ip dhcp-client set enabled=yes interface=ether1
-
Check, if you have received IP configuration using lease print, for
example: [admin@MikroTik] ip dhcp-client> lease print
address: 81.198.16.4/21
expires: may/10/2001 04:41:49
gateway: 81.198.16.1
primary-dns: 195.13.160.52
secondary-dns: 195.122.1.59
[admin@MikroTik] ip dhcp-client>
-
Add your private network address to ether2 interface, for example: /ip address add address=192.168.0.1/24 interface=ether2
-
Configure masquerading for your local network: /ip firewall src-nat add out-interface=ether1 action=masquerade
comment="Masquerades everything leaving the external interface"
-
Configure firewall to protect your router: /ip firewall rule input add connection-state=invalid action=drop
comment="Drop invalid connection packets"
/ip firewall rule input add connection-state=established
comment="Allow established connections"
/ip firewall rule input add connection-state=related
comment="Allow related connections"
/ip firewall rule input add protocol=udp comment="Allow UDP"
/ip firewall rule input add protocol=icmp comment="Allow ICMP Ping"
/ip firewall rule input add src-address=192.168.0.0/24
comment="From my home network"
/ip firewall rule input add action=drop log=yes
comment="Log and drop everything else"
-
(Optional) Configure DHCP server to hand out IP configuration on your home
network: /ip pool add name=private ranges=192.168.0.2-192.168.0.254
/ip dhcp-server network add gateway=192.168.0.1 address=192.168.0.0/24
dns-server=195.13.160.52,195.122.1.59 domain="mail.com"
/ip dhcp-server add name=home interface=ether2 lease-time=3h
address-pool=private
/ip dhcp-server enable home
That's it! You can access the Internet from your home
network! |