#!/bin/bash #title :install-dns-on-ubuntu1404.sh #description :This script will install dns on ubuntu 14.04 #author :Henry den Hengst #date :25 November 2014 #version :0.1 #usage :bash install-dns-on-ubuntu1404.sh #URL :- #user_password :- #notes :- #bash_version :- #credits_source :https://help.ubuntu.com/ # sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install bind9 dnsutils openssh-server ntp -y # Edit /etc/network/interfaces to meet your requirements. # sudo sed -i 's!dhcp!static!g' /etc/network/interfaces sudo sed -i '$ a\address 192.168.1.10' /etc/network/interfaces sudo sed -i '$ a\netmask 255.255.255.0' /etc/network/interfaces sudo sed -i '$ a\network 192.168.1.0' /etc/network/interfaces sudo sed -i '$ a\broadcast 192.168.1.255' /etc/network/interfaces sudo sed -i '$ a\gateway 192.168.1.1' /etc/network/interfaces # sudo sed -i '$ a\dns-nameservers 192.168.1.10 192.168.1.11 8.8.8.8 8.8.4.4' /etc/network/interfaces sudo sed -i '$ a\dns-search cloudconsult.local' /etc/network/interfaces sudo sed -i '$ a\dns-domain cloudconsult.local' /etc/network/interfaces # # restart network sudo service networking restart # cd /etc/bind/ # sudo rm named.conf.options # sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/named.conf.options sudo rm named.conf.local sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/named.conf.local sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/db.cloudconsult.local sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/db.192 sudo service bind9 restart sudo ufw enable sudo ufw allow OpenSSH sudo ufw allow Bind9
Showing posts with label DNS. Show all posts
Showing posts with label DNS. Show all posts
Ubuntu DNS Primary Master with Caching Nameserver
DNS Auto Install Script
Auto DNS Install and configure on Ubuntu
DNS Auto Install Script
#!/bin/bash # # Before echo Before > quertytime.txt dig distrowatch.com | grep 'Query time' >> quertytime.txt # sudo apt-get install bind9 dnsutils bind9-doc -y # sudo xxx /etc/bind/named.conf.options forwarders { 8.8.8.8; 8.8.4.4; }; # sudo xxx /etc/bind/named.conf.local zone "linux.rocks" { type master; file "/etc/bind/db.linux.rocks"; }; zone "96.168.192.in-addr.arpa" { type master; notify no; file "/etc/bind/db.192"; }; # sudo cp /etc/bind/db.local /etc/bind/db.linux.rocks sudo xxx /etc/bind/db.linux.rocks zie 192.168.1.4 # sudo cp /etc/bind/db.127 /etc/bind/db.192 sudo xxx /etc/bind/db.192 # sudo /etc/init.d/bind9 start # ping a-host-in-netwerk -c 4 > test.txt # # # After echo After >> quertytime.txt dig distrowatch.com | grep 'Query time' >> quertytime.txt
Mikrotik Router Basic Configuration
IP Address Configuration:
/ip address add address=192.168.1.1/24 network=192.168.1.0 interface=LOCAL add address=192.168.0.2/24 network=192.168.0.0 interface=WAN
DNS Configuration:
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=4.4.4.4,8,8.8.8.8
NAT Configuration:
/ip firewall nat add chain=srcnat action=masquerade src-address=192.168.1.0/24 out-interface=WAN
IP Route Configuration:
/ip route add dst-address=0.0.0.0/0 gateway=192.168.0.1
Simple Queue Configuration For Client 192.168.1.2:
/queue simple Add name="xxx" target-addresses=192.168.1.2/32 interface=LOCAL parent=none packet-marks="" direction=both priority=8 queue=default-small/default-small limit-at=0/0 max-limit=512k/512kburst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s total-queue=default-small
Simple Queue Configuration For Client 192.168.1.3:
/queue simple Add name="yyy" target-addresses=192.168.1.3/32 interface=LOCAL parent=none packet-marks="" direction=both priority=8 queue=default-small/default-small limit-at=0/0 max-limit=1M/1M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s total-queue=default-small
Setting Up Mikrotik Hotspot Server
For your information , Mikrotik is a router os with all in one solution
for small business and solution for your small or Big Network. Mikrotik
Router OS or Mikrotik Router Board can be used and setting as a Hotspot
gateway with a login page. In this tutorials i will saw you how to configure Mikrotik as a Hotspot network with Login page
and user manager . This is just a basic configuration, in the next
article i will guide you to setting up the mikrotik as a hotspot with
fully fiutured intergrated system.
For the first , make sure your router is have been installed this package :
System
DHCP
Wireless
Hotspot
Proxy
User Manager
Security
Advanced tools
Step to setting up Mikrotik hotspot :
Now, we will configure the user manager :
Done, your Mikrotik now can be use as hospot gateway !!
For the first , make sure your router is have been installed this package :
System
DHCP
Wireless
Hotspot
Proxy
User Manager
Security
Advanced tools
Step to setting up Mikrotik hotspot :
system identity set name=MyNet ip address add address 192.168.1.2/27 interface=ether1 ip address add address 192.168.0.1/24 interface=ether2
add comment="" disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\ 192.168.1.1 scope=30 target-scope=10
[admin@MikroTik] > ip hotspot setup hotspot interface: ether2 local address of network: 192.168.0.1/24 masquerade network: yes address pool of network: 192.168.0.2-192.168.0.250 select certificate: none ip address of smtp server: 0.0.0.0 dns servers: 8.8.8.8 dns name: hotspot.mynet name of local hotspot user: user password for the user: password
Now, we will configure the user manager :
tool user-manager customer add login=admin password=password tool user-manager router add ip-address=127.0.0.1 shared-secret=12345 subscriber=admin radius add service=hotspot address=127.0.0.1 secret=12345 ip hotspot profile set 1 use-radius=yes
Done, your Mikrotik now can be use as hospot gateway !!
Auto Flush Mikrotik DNS
A MikroTik router with DNS feature enabled can be set as a DNS server for any DNS-compliant client. Moreover, MikroTik router can be specified as a primary DNS server under its dhcp-server settings. When the remote requests are enabled, the MikroTik router responds to TCP and UDP DNS requests on port 53.
/ip dns set allow-remote-requests=yes cache-size=10240KiB servers=8.8.8.8,8.8.4.4
/system scheduler add interval=1d name="DNS FLUSH" on-event=dnsflush policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=apr/25/2017 start-time=04:00:00
/system script add name=dnsflush policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source="/ip dns cache flush"
Subscribe to:
Posts (Atom)
Mikrotik Malicious Spam IP Blacklist – Firewall Auto Update Script
We have published a malicious ip blacklist for free! Combined dshield and spamhaus malicious blacklists formatted for Mikrotik RouterOS .r...
-
Block torrents with mikrotik / ip firewall layer7 - protocol add comment = "Block Bit Torrent" name = layer7 - bittorrent - ex...
-
We have published a malicious ip blacklist for free! Combined dshield and spamhaus malicious blacklists formatted for Mikrotik RouterOS .r...
-
# Mark speedtest in Layer7 firewall / ip firewall layer7 - protocol add name = speedtest regexp = "^.+(speedtest).* \\ \$" #...