Diarsipkan di bawah: Microtik
Diarsipkan di bawah: Microtik
Summary
PPTP (Point to Point Tunnel Protocol) supports encrypted tunnels over IP. The MikroTik RouterOS implementation includes support fot PPTP client and server.
General applications of PPTP tunnels:
* For secure router-to-router tunnels over the Internet
* To link (bridge) local Intranets or LANs (when EoIP is also used)
* For mobile or remote clients to remotely access an Intranet/LAN of a company (see PPTP setup for Windows for more information)
Each PPTP connection is composed of a server and a client. The MikroTik RouterOS may function as a server or client – or, for various configurations, it may be the server for some connections and client for other connections. For example, the client created below could connect to a Windows 2000 server, another MikroTik Router, or another router which supports a PPTP server.
Description
PPTP is a secure tunnel for transporting IP traffic using PPP. PPTP encapsulates PPP in virtual lines that run over IP. PPTP incorporates PPP and MPPE (Microsoft Point to Point Encryption) to make encrypted links. The purpose of this protocol is to make well-managed secure connections between routers as well as between routers and PPTP clients (clients are available for and/or included in almost all OSs including Windows).
PPTP includes PPP authentication and accounting for each PPTP connection. Full authentication and accounting of each connection may be done through a RADIUS client or locally.
MPPE 40bit RC4 and MPPE 128bit RC4 encryption are supported.
PPTP traffic uses TCP port 1723 and IP protocol GRE (Generic Routing Encapsulation, IP protocol ID 47), as assigned by the Internet Assigned Numbers Authority (IANA). PPTP can be used with most firewalls and routers by enabling traffic destined for TCP port 1723 and protocol 47 traffic to be routed through the firewall or router.
PPTP connections may be limited or impossible to setup though a masqueraded/NAT IP connection. Please see the Microsoft and RFC links at the end of this section for more information.
PPTP Client Setup
Submenu level : /interface pptp-client
Property Description
name (name; default: pptp-out1) – interface name for reference
mtu (integer; default: 1460) – Maximum Transmit Unit. The optimal value is the MTU of the interface the tunnel is working over decreased by 40 (so, for 1500-byte ethernet link, set the MTU to 1460 to avoid fragmentation of packets)
mru (integer; default: 1460) – Maximum Receive Unit. The optimal value is the MTU of the interface the tunnel is working over decreased by 40 (so, for 1500-byte ethernet link, set the MRU to 1460 to avoid fragmentation of packets)
connect-to (IP address)- the IP address of the PPTP server to connect to
user (string)- user name to use when logging on to the remote server
password (string; default: “”)- user password to use when logging to the remote server
profile (name; default: default) – profile to use when connecting to the remote server
add-default-route (yes | no; default: no) – whether to use the server which this client is connected to as its default router (gateway)
Example
To set up PPTP client named test2 using username john with password john to connect to the 10.1.1.12 PPTP server and use it as the default gateway:
[admin@MikroTik] interface pptp-client> add name=test2 connect-to=10.1.1.12 \
\… user=john add-default-route=yes password=john
[admin@MikroTik] interface pptp-client> print
Flags: X – disabled, R – running
0 X name=”test2″ mtu=1460 mru=1460 connect-to=10.1.1.12 user=”john”
password=”john” profile=default add-default-route=yes
[admin@MikroTik] interface pptp-client> enable 0
Monitoring PPTP Client
Command name : /interface pptp-client monitor
Property Description
Statistics:
uptime (time) – connection time displayed in days, hours, minutes, and seconds
encoding (string) – encryption and encoding (if asymmetric, separated with ‘/’) being used in this connection
status (string) – status of the client:
# Dialing – attempting to make a connection
# Verifying password… – connection has been established to the server, password verification in progress
# Connected – self-explanatory
# Terminated – interface is not enabled or the other side will not establish a connection
Example
Example of an established connection:
[admin@MikroTik] interface pptp-client> monitor test2
uptime: 4h35s
encoding: MPPE 128 bit, stateless
status: Connected
[admin@MikroTik] interface pptp-client>
PPTP Server Setup
Submenu level : /interface pptp-server server
[admin@MikroTik] interface pptp-server server> print
enabled: no
mtu: 1460
mru: 1460
authentication: mschap2
default-profile: default
[admin@MikroTik] interface pptp-server server>
Description
The PPTP server supports unlimited connections from clients. For each current connection, a dynamic interface is created.
Property Description
enabled (yes | no; default: no) – defines whether PPTP server is enabled or not
mtu (integer; default: 1460) – Maximum Transmit Unit. The optimal value is the MTU of the interface the tunnel is working over decreased by 40 (so, for 1500-byte ethernet link, set the MTU to 1460 to avoid fragmentation of packets)
mru (integer; default: 1460) – Maximum Receive Unit. The optimal value is the MTU of the interface the tunnel is working over decreased by 40 (so, for 1500-byte ethernet link, set the MTU to 1460 to avoid fragmentation of packets)
authentication (multiple choice: pap | chap | mschap1 | mschap2; default: mschap2) – authentication algorithm
default-profile (name; default: default) – default profile to use
Example
To enable PPTP server:
[admin@MikroTik] interface pptp-server server> set enabled=yes
[admin@MikroTik] interface pptp-server server> print
enabled: yes
mtu: 1460
mru: 1460
authentication: mschap2
default-profile: default
[admin@MikroTik] interface pptp-server server>
PPTP Server Users
Submenu level : /interface pptp-server
Description
There are two types of items in PPTP server configuration – static users and dynamic connections. A dynamic connection can be established if the user database or the default-profile has its local-address and remote-address set correctly. When static users are added, the default profile may be left with its default values and only P2P user (in /ppp secret) should be configured. Note that in both cases P2P users must be configured properly.
Property Description
name – interface name
user – the name of the user that is configured statically or added dynamically
Statistics:
mtu – shows (cannot be set here) client’s MTU
client-address – shows (cannot be set here) the IP of the connected client
uptime – shows how long the client is connected
encoding (string) – encryption and encoding (if asymmetric, separated with ‘/’) being used in this connection
Example
To add a static entry for ex1 user:
[admin@MikroTik] interface pptp-server> add user=ex1
[admin@MikroTik] interface pptp-server> print
Flags: X – disabled, D – dynamic, R – running
# NAME USER MTU CLIENT-ADDRESS UPTIME ENC…
0 DR ex 1460 10.0.0.202 6m32s none
1 pptp-in1 ex1
[admin@MikroTik] interface pptp-server>
In this example an already connected user ex is shown besides the one we just added.
PPTP Router-to-Router Secure Tunnel Example
The following is an example of connecting two Intranets using an encrypted PPTP tunnel over the Internet.
There are two routers in this example:
* [HomeOffice]
Interface LocalHomeOffice 10.150.2.254/24
Interface ToInternet 192.168.80.1/24
* [RemoteOffice]
Interface ToInternet 192.168.81.1/24
Interface LocalRemoteOffice 10.150.1.254/24
Each router is connected to a different ISP. One router can access another router through the Internet.
On the PPTP server a user must be set up for the client:
[admin@HomeOffice] ppp secret> add name=ex service=pptp password=lkjrht
local-address=10.0.103.1 remote-address=10.0.103.2
[admin@HomeOffice] ppp secret> print detail
Flags: X – disabled
0 name=”ex” service=pptp caller-id=”” password=”lkjrht” profile=default
local-address=10.0.103.1 remote-address=10.0.103.2 routes==””
[admin@HomeOffice] ppp secret>
Then the user should be added in the PPTP server list:
[admin@HomeOffice] interface pptp-server> add user=ex
[admin@HomeOffice] interface pptp-server> print
Flags: X – disabled, D – dynamic, R – running
# NAME USER MTU CLIENT-ADDRESS UPTIME ENC…
0 pptp-in1 ex
[admin@HomeOffice] interface pptp-server>
And finally, the server must be enabled:
[admin@HomeOffice] interface pptp-server server> set enabled=yes
[admin@HomeOffice] interface pptp-server server> print
enabled: yes
mtu: 1460
mru: 1460
authentication: mschap2
default-profile: default
[admin@HomeOffice] interface pptp-server server>
Add a PPTP client to the RemoteOffice router:
[admin@RemoteOffice] interface pptp-client> add connect-to=192.168.80.1 user=ex \
\… password=lkjrht disabled=no
[admin@RemoteOffice] interface pptp-client> print
Flags: X – disabled, R – running
0 R name=”pptp-out1″ mtu=1460 mru=1460 connect-to=192.168.80.1 user=”ex”
password=”lkjrht” profile=default add-default-route=no
[admin@RemoteOffice] interface pptp-client>
Thus, a PPTP tunnel is created between the routers. This tunnel is like an Ethernet point-to-point connection between the routers with IP addresses 10.0.103.1 and 10.0.103.2 at each router. It enables ‘direct’ communication between the routers over third party networks.
To route the local Intranets over the PPTP tunnel – add these routes:
[admin@HomeOffice] > ip route add dst-address 10.150.1.0/24 gateway 10.0.103.2
[admin@RemoteOffice] > ip route add dst-address 10.150.2.0/24 gateway 10.0.103.1
On the PPTP server it can alternatively be done using routes parameter of the user configuration:
[admin@HomeOffice] ppp secret> print detail
Flags: X – disabled
0 name=”ex” service=pptp caller-id=”” password=”lkjrht” profile=default
local-address=10.0.103.1 remote-address=10.0.103.2 routes==””
[admin@HomeOffice] ppp secret> set 0 routes=”10.150.1.0/24 10.0.103.2 1″
[admin@HomeOffice] ppp secret> print detail
Flags: X – disabled
0 name=”ex” service=pptp caller-id=”” password=”lkjrht” profile=default
local-address=10.0.103.1 remote-address=10.0.103.2
routes=”10.150.1.0/24 10.0.103.2 1″
[admin@HomeOffice] ppp secret>
Test the PPTP tunnel connection:
[admin@RemoteOffice]> /ping 10.0.103.1
10.0.103.1 pong: ttl=255 time=3 ms
10.0.103.1 pong: ttl=255 time=3 ms
10.0.103.1 pong: ttl=255 time=3 ms
ping interrupted
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 3/3.0/3 ms
Test the connection through the PPTP tunnel to the LocalHomeOffice interface:
[admin@RemoteOffice]> /ping 10.150.2.254
10.150.2.254 pong: ttl=255 time=3 ms
10.150.2.254 pong: ttl=255 time=3 ms
10.150.2.254 pong: ttl=255 time=3 ms
ping interrupted
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 3/3.0/3 ms
To bridge a LAN over this secure tunnel, please see the example in the ‘EoIP’ section of the manual. To set the maximum speed for traffic over this tunnel, please consult the ‘Queues’ section.
Connecting a Remote Client via PPTP Tunnel
The following example shows how to connect a computer to a remote office network over PPTP encrypted tunnel giving that computer an IP address from the same network as the remote office has (without need of bridging over eoip tunnels)
Please, consult the respective manual on how to set up a PPTP client with the software You are using.
The router in this example:
* [RemoteOffice]
Interface ToInternet 192.168.81.1/24
Interface Office 10.150.1.254/24
The client computer can access the router through the Internet.
On the PPTP server a user must be set up for the client:
[admin@RemoteOffice] ppp secret> add name=ex service=pptp password=lkjrht
local-address=10.150.1.254 remote-address=10.150.1.2
[admin@RemoteOffice] ppp secret> print detail
Flags: X – disabled
0 name=”ex” service=pptp caller-id=”” password=”lkjrht” profile=default
local-address=10.150.1.254 remote-address=10.150.1.2 routes==””
[admin@RemoteOffice] ppp secret>
Then the user should be added in the PPTP server list:
[admin@RemoteOffice] interface pptp-server> add name=FromLaptop user=ex
[admin@RemoteOffice] interface pptp-server> print
Flags: X – disabled, D – dynamic, R – running
# NAME USER MTU CLIENT-ADDRESS UPTIME ENC…
0 FromLaptop ex
[admin@RemoteOffice] interface pptp-server>
And the server must be enabled:
[admin@RemoteOffice] interface pptp-server server> set enabled=yes
[admin@RemoteOffice] interface pptp-server server> print
enabled: yes
mtu: 1460
mru: 1460
authentication: mschap2
default-profile: default
[admin@RemoteOffice] interface pptp-server server>
Finally, the proxy APR must be enabled on the ‘Office’ interface:
[admin@RemoteOffice] interface ethernet> set Office arp=proxy-arp
[admin@RemoteOffice] interface ethernet> print
Flags: X – disabled, R – running
# NAME MTU MAC-ADDRESS ARP
0 R ToInternet 1500 00:30:4F:0B:7B:C1 enabled
1 R Office 1500 00:30:4F:06:62:12 proxy-arp
[admin@RemoteOffice] interface ethernet>
ref: http://www.mikrotik.com/documentation//manual_2.7/Interface/PPTP.html
Diarsipkan di bawah: Microtik
Mikrotik peer to peer traffic control
http://www.mikrotik.com/testdocs/ros/2.8/ip/peer2peer.pdf
Download manual mikrotik – ebook
Ada e book dari situsnya mikrotik yang berbasis web/html, jumlahnya ratusan halaman, saya menyajikannya dalam bentuk pdf.
berikut juga dilengkapi tutorial mikrotik berbasis video.
Tutorial lengkap manual Mikrotik lengkap dari nol, sudah saya upload ke rapidshare , silahkan di download.
Reference Manual of MikroTik RouterOS :
http://rapidshare.com/files/31639172/refman2.9.pdf
Video Tutorial of MikroTik RouterOS :
http://rapidshare.com/files/31372948/Mikrotic.rar
salam mikrotiker ![]()
Diarsipkan di bawah: Uncategorized
2. Pilih Menu IP kemudian Pilih Web Proxy

3. Klik menu Settings

4. Buat setting seperti ini

5. Kemudian Klik Enable
6. Untuk memblokir situs klik tanda PLUS

7. Pilih menua IP kemudian pilih Firewall

8. Pilih tab NAT

9. Add NAT Rule
10. Pada kolom In. Interface isikan ether ang kamu pake
11. Pilih tab Action
12. Buat seperti gambar kemudian klik Apply dan OK
Dah selesai donk
Sekarang silahkan di coba proxynya
Semoga berhasil
Load Balancing Di Mikrotik OS
Kondisi : ISP dimana kita bekerja sebagai Administrator menggunakan lebih dari satu gateway untuk terhubung ke Internet. Semuanya harus dapat melayani layanan upstream & downstream. Karena akan beda kasusnya apabila salah satunya hanya dapat melayani downstream, contohnya jika menggunakan VSAT DVB One-way.
Untuk kasus ini dimisalkan ISP memiliki 2 jalur ke Internet. Satu menggunakan akses DSL (256 Kbps) dan lainnya menggunakan Wireless (512 Kbps). Dengan rasio pemakaian DSL:Wireless = 1:2 .
Yang akan dilakukan :
1. Menggunakan semua jalur gateway yang tersedia dengan teknik load-balancing.
2. Menjadikan salah satunya sebagai back-up dengan teknik fail-over.
OK, mari saja kita mulai eksperimennya :
1. IP address untuk akses ke LAN :
> /ip address add address=192.168.0.1/28 interface=LAN
IP address untuk akses ke jalur DSL :
> /ip address add address=10.32.57.253/29 interface=DSL
IP address untuk akses ke jalur Wireless :
> /ip address add address=10.9.8.2/29 interface=WIRELESS
Tentukan gateway dengan rasionya masing-masing :
> /ip route add gateway=10.32.57.254,10.9.8.1,10.9.8.1
2. Pada kasus untuk teknik fail-over. Diasumsikan jalur utama melalui Wireless dengan jalur DSL sebagai back-up apabila jalur utama tidak dapat dilalui. Untuk mengecek apakah jalur utama dapat dilalui atau tidak, digunakan command ping.
> /ip firewall mangle add chain=prerouting src-address=192.168.0.0/28 action=mark-routing new-routing-mark=SUBNET1-RM
> /ip route add gateway=10.9.8.1 routing-mark=SUBNET1-RM check-gateway=ping
> /ip route add gateway=10.32.57.254
3. Good Luck!!
PCQ
Dengan menggunakan queue type pcq di Mikrotik, kita bisa membagi bandwidth yang ada secara merata untuk para pelahap-bandwidth™ Dsaat jaringan pada posisi peak.
Contohnya, kita berlangganan 256 Kbps. Kalau ada yang sedang berinternet ria, maka beliau dapat semua itu jatah bandwidth. Tetapi begitu teman-temannya datang, katakanlah 9 orang lagi, maka masing-masingnya dapat sekitar 256/10 Kbps. Yah.. masih cukup layaklah untuk buka-buka situs non-porn atau sekedar cek e-mail & blog ).
OK, langsung saja ke caranya :
1. Asumsi : Network Address 192.168.169.0/28, interface yang mengarah ke pengguna diberi nama LAN, dan interface yang mengarah ke upstream provider diberi nama INTERNET;
2. Ketikkan di console atau terminal :
> /ip firewall mangle add chain=forward src-address=192.168.169.0/28 action=mark-connection new-connection-mark=NET1-CM
> /ip firewall mangle add connection-mark=NET1-CM action=mark-packet new-packet-mark=NET1-PM chain=forward
> /queue type add name=downsteam-pcq kind=pcq pcq-classifier=dst-address
> /queue type add name=upstream-pcq kind=pcq pcq-classifier=src-address
> /queue tree add parent=LAN queue=DOWNSTREAM packet-mark=NET1-PM
> /queue tree add parent=INTERNET queue=UPSTREAM packet-mark=NET1-PM
3. Good Luck!!
Memanipulasi ToS ICMP & DNS di MikroTik
Tujuan :
* Memperkecil delay ping dari sisi klien ke arah Internet.
* Mempercepat resolving hostname ke ip address.
Asumsi : Klien-klien berada pada subnet 10.10.10.0/28
1. Memanipulasi Type of Service untuk ICMP Packet :
> ip firewall mangle add chain=prerouting src-address=10.10.10.0/28 protocol=icmp action=mark-connection new-connection-mark=ICMP-CM passthrough=yes
> ip firewall mangle add chain=prerouting connection-mark=ICMP-CM action=mark-packet new-packet-mark=ICMP-PM passthrough=yes
> ip firewall mangle add chain=prerouting packet-mark=ICMP-PM action=change-tos new-tos=min-delay
2. Memanipulasi Type of Service untuk DNS Resolving :
> ip firewall mangle add chain=prerouting src-address=10.10.10.0/28 protocol=tcp dst-port=53 action=mark-connection new-connection-mark=DNS-CM passthrough=yes
> ip firewall mangle add chain=prerouting src-address=10.10.10.0/28 protocol=udp dst-port=53 action=mark-connection new-connection-mark=DNS-CM passthrough=yes
> ip firewall mangle add chain=prerouting connection-mark=DNS-CM action=mark-packet new-packet-mark=DNS-PM passthrough=yes
> ip firewall mangle add chain=prerouting packet-mark=DNS-PM action=change-tos new-tos=min-delay
3. Menambahkan Queue Type :
> queue type add name=”PFIFO-64″ kind=pfifo pfifo-limit=64
4. Mengalokasikan Bandwidth untuk ICMP Packet :
> queue tree add name=ICMP parent=INTERNET packet-mark=ICMP-PM priority=1 limit-at=8000 max-limit=16000 queue=PFIFO-64
5. Mengalokasikan Bandwidth untuk DNS Resolving :
> queue tree add name=DNS parent=INTERNET packet-mark=DNS-PM priority=1 limit-at=8000 max-limit=16000 queue=PFIFO-64
6. Good Luck!!
Queue Tree with more than two interfaces
Basic Setup
This page will tak about how to make QUEUE TREE in RouterOS that with Masquerading for more than two interfaces. It’s for sharing internet connection among users on each interfacess. In manual this possibility isn’t writted.
First, let’s set the basic setting first. I’m using a machine with 3 or more network interfaces:
[admin@instaler] > in pr
# NAME TYPE RX-RATE TX-RATE MTU
0 R public ether 0 0 1500
1 R wifi1 wlan 0 0 1500
2 R wifi2 wlan 0 0 1500
3 R wifi3 wlan 0 0 1500
And this is the IP Addresses for each interface:
[admin@instaler] > ip ad pr
Flags: X – disabled, I – invalid, D – dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.20.1.0/24 10.20.1.0 10.20.1.255 public
1 10.10.2.0/24 10.10.2.0 10.10.2.255 wifi1
2 10.10.3.0/24 10.10.3.0 10.10.3.255 wifi2
3 10.10.4.0/24 10.10.4.0 10.10.4.255 wifi3
On the public you can add NAT or proxy if you want.
Mangle Setup
And now is the most important part in this case.
We need to mark our users. One connectoin for upload and second for download. In this example I add mangle for one user. At the end I add mangle for local transmission because I don’t QoS local trafic emong users. But for user I need to separate upload and download.
[admin@instaler] ip firewall mangle> print
Flags: X – disabled, I – invalid, D – dynamic
disabled=no
0 chain=forward dst-address=10.10.2.36 action=mark-connection
new-connection-mark=users-userU passthrough=yes comment=”” disabled=no
1 chain=forward dst-address=10.10.2.36 action=mark-connection
new-connection-mark=users-userD passthrough=yes comment=”” disabled=no
2 chain=forward connection-mark=users-userU action=mark-packet
new-packet-mark=userU passthrough=yes comment=”” disabled=no
3 chain=forward connection-mark=users-userD action=mark-packet
new-packet-mark=userD passthrough=yes comment=”” disabled=no
98 chain=forward src-address=10.10.0.0/16 dst-address=10.10.0.0/16
action=mark-connection new-connection-mark=users-lokal passthrough=yes
99 chain=forward connection-mark=users-lokal action=mark-packet
new-packet-mark=lokalTrafic passthrough=yes
Queue Tree Setup
And now, the queue tree setting. We need one rule for downlink and one rule for uplink. Be careful when choosing the parent. for downlink traffic, we use parent “global-out”, because we have two or more downloading interfaces. And for uplink, we are using parent “public”, we want QoS uplink traffic. (I’m using pcq-up and download from manual) This example is for 2Mb/1Mb
[admin@instaler] > queue tree pr
Flags: X – disabled, I – invalid
0 name=”Download” parent=global-out packet-mark=”” limit-at=0
queue=pcq-download priority=1 max-limit=2000000 burst-limit=0
burst-threshold=0 burst-time=0s
1 name=”Upload” parent=WGW packet-mark=”” limit-at=0 queue=pcq-upload
priority=1 max-limit=1000000 burst-limit=0 burst-threshold=0
burst-time=0s
Now we add our user:
2 name=”user10D” parent=Download packet-mark=userD limit-at=0
queue=pcq-download priority=5 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s
3 name=”user10U” parent=Upload packet-mark=userU limit-at=0
queue=pcq-upload priority=5 max-limit=0 burst-limit=0 burst-threshold=0
burst-time=0s
MAC Address + IP Address Linux
#!/bin/sh
iptables=/sbin/iptables
#definisikan default policy disini
$iptables -F INPUT
$iptables -F OUTPUT
$iptables -P INPUT DROP
$iptables -P OUTPUT DROP #ingat nanti buka policy output yg perlu
$iptables -F FORWARD
$iptables -F -t nat
$iptables -P FORWARD DROP
#definisi default policy dan bikin chain baru bernama maccheck di interface eth1
$iptables -t mangle -F
$iptables -t mangle -F maccheck
$iptables -t mangle -X maccheck
$iptables -t mangle -N maccheck
$iptables -t mangle -I PREROUTING -i eth1 -p all -j maccheck
#self explanatory… ip address + mac
$iptables -t mangle -A maccheck -s 192.168.0.1 -i eth1 -m mac -j RETURN
–mac-source
00:80:11:11:11:11
$iptables -t mangle -A maccheck -s 192.168.0.2 -i eth1 -m mac -j RETURN
–mac-source
00:80:22:22:22:22
$iptables -t mangle -A maccheck -s 192.168.0.3 -i eth1 -m mac -j RETURN
–mac-source
00:80:33:33:33:33
#selain yg terdaftar baik ip maupun mac akan di mark untuk nanti di drop, isi
dengan salah satu
mac yg aktif yg mana saja
#disini contohnya 00:80:11:11:11:11 yg sudah kita definisikan di atas
$iptables -t mangle -A maccheck -s 0/0 -i eth1 -m mac -j MARK –mac-source !
00:80:11:11:11:11
–set-mark 1
$iptables -t mangle -A maccheck -s 0/0 -i eth1 -p all -j MARK –set-mark 1
#drop packet yg di mark
$iptables -A INPUT -i eth1 -m mark –mark 1 -j DROP
$iptables -A OUTPUT -o eth1 -m mark –mark 1 -j DROP
$iptables -A FORWARD -i eth1 -m mark –mark 1 -j DROP
#lanjutkan firewall script anda disini
source = primadonal.com
Diarsipkan di bawah: Uncategorized
Sekedar berbagi buat kawan-kawan semoga bermanfaat, kebetulan kemarin di kantor ku ISP nya di ganti dari yang dulunya pake modem ADSL sekarang pake yang model fiber optik jadi langsung dari ISPnya ke router kantorku dengan kabel utp masukin ke router, nah terus setting pppoe di router konfigurasinya begini(email dari technical support nya…:):), maklum aku masih belajar)…
! – Masuk ke Global Configuration Mode
Router# config terminal
Router(config)# vpdn enable
Router(config)# vpdn-group pppoe
Router(config-vpdn)# request-dialin
Router(config-vpdn)# protocol pppoe
Router(config-vpdn)# exit
! – Kembali ke Global configuration mode
Router(config)# interface dialer1
Router(config-if)# ip address negotiated
Router(config-if)# encapsulation ppp
Router(config-if)# ip mtu 1492
! – Default untuk mtu interface Ethernet 1500
! – (1492 + PPPoE headers = 1500)
Router(config-if)# ip nat outside
Router(config-if)# dialer pool 1
Router(config-if)# dialer-group 1
Router(config-if)# ppp authentication chap callin
Router(config-if)# ppp chap hostname
Router(config-if)# ppp chap password
Router(config-if)# ppp pap sent−username password
! – Username dan password yaitu account dari service prepaid
Router(config)# dialer-list 1 protocol ip permit
Router(config)# interface fastethernet0/1
Router(config-if)# ip address 10.10.1.0 255.255.255.0
Router(config-if)# ip nat inside
Router(config-if)# exit
! – ini adalah interface dan ip address untuk kearah local LAN
Router(config)# interface fastethernet0/0
Router(config-if)# pppoe enable
Router(config-if)# pppoe-client dial-pool-number 1
Router(config-if)# exit
! – ini adalah interface untuk kearah ISP-nya
Router(config)# ip nat inside source list 1 interface dialer 1 overload
Router(config)# ip classless
Router(config)# ip route 0.0.0.0 0.0.0.0 dialer1
Router(config)# no ip http server
Router(config)# dialer-list 1 protocol ip permit
Router(config)# access-list 1 permit 10.10.0.0 0.0.0.255
Router(config)# exit
Router# copy running-config startup-config
Untuk LAN menggunakan DHCP
Tambahkan konfigurasi di router diatas dengan DHCP Pool
Router# config terminal
Router(config)# ip dhcp pool Internal_LAN
Router(dhcp-config)# network 10.10.11.0 255.255.255.0
! – harus satu segmen dengan LAN Interface (FastEthernet 0/1)
! – internal_LAN adalah nama DHCP pool
Router(dhcp-config)# default-router 10.10.0.4
! – ip address interface LAN (FastEthernet 0/1)
Router(dhcp-config)# ip name-server 192.168.11.58 192.168.11.57
! – konfigurasi agar client mendapatkan DNS secara otomatis
Router(dhcp-config)# ^Z
Router# copy running-config startup-config
Diarsipkan di bawah: Microtik
Konfigurasi Mikrotik RouterOS dan Distribusi LAN
· Instalasi Mikrotik RouterOS pada PC Server Internet dan winbox pada PC klien dalam jaringan lokal.
· Setelah selesai, login ke mikrotik dengan user “admin” dan password biasanya dikosongkan saja.
· Jika ingin mengganti password admin pada konsole ketik :
> password
Kemudian ketikkan password baru yang diinginkan.
Jika ingin mengganti nama mikrotik router ketik :
> system identity set name=”nama_router_yang_diinginkan”
· Kemudian lihat interface yang ada pada mikrotik router, ketik :
> interface print
· Berikan ip address pada masing-masing interface pada mikrotik, ketik :
> ip address add address=”alamat_ip_address” netmask=”255.255.255.xxx” interface=”nama_interface”
Ulangi untuk setiap interface yang ada ….
· Lihat hasil konfigurasi ip address untuk interface, ketik :
> ip address print
· Berikan default gateway pada mikrotik router, ketik :
> ip route add gateway=”ip_address_gateway_internet”
· Lihat tabel routing pada mikrotik router, ketik :
> ip route print
· Tes ping ke gateway, ulangi konfigurasi jika ping belum berhasil.
· Konfigurasikan DNS pada mikrotik router, ketik :
> ip dns set primary-dns=”ip_address_dns_pertama” allow-remoterequests=no
> ip dns set secondary-dns=”ip_address_dns_kedua” allow-remoterequests=no
· Lihat konfigurasi dns, ketik :
> ip dns print
· Tes ping domain untuk memastikan koneksi ke internet telah berhasil, ketik :
> ping www.ipnet.net.id
· Kemudian konfigurasikan masquerading untuk menjadikan mikrotik router sebagai gateway internet pada jaringan lokal, ketik :
> ip firewall nat add action=masquerade out-interface=”nama_interface_yang_dijadikan_keluaran_ke_ineternet-yang_terhubung_ke_isp” chain=srcnat
· Lihat konfigurasi masquerading, ketik :
> ip firewall nat print
· Tes koneksi internet dari jaringan lokal….., ulangi konfigurasi jika belum berhasil.
· Buat DHCP server pada mikrotik router, ketik :
> ip dhcp-server setup
> dhcp server interface : “nama_interface_yang_digunakan”
> dhcp server space : “network_yang_akan_di DHCP”
> gateway for dhcp network : “ip_address_gateway_didalam_network”
> address to give out : “range_ip_address_yang_akan_diberikan_ke_network”
> dns servers : “ip_dns_primary”,”ip_dns_secondary”
> lease time : “waktu_sewa_yang_diberikan”
atau dengan perintah :
> ip pool add name=”nama-pool-dhcp” ranges=”misalkan 192.168.1.2-192.168.1.254”
· Tambahkan DHCP network dan gatewaynya yang akan didistribusikan ke klien lokal, ketik :
> ip dhcp-server network add address=”misal 192.168.1.0/24 gateway=”ip_address_gateway_jaringan_lokal”
· Tambahkan DHCP server, ketik :
> ip dhcp-server add interface=”interface_yang_ke_jaringan_lokal” address-pool=”nama_pool_dhcp”
· Lihat status DHCP server, ketik :
> ip dhcp-server print
· Biasanya status dhcp server masih disable, maka enable-kan, ketik :
> ip dhcp-server enable 0
· Tes ip address PC klien, pastikan ip address didapat dari DHCP Server.
· Tes koneksi ke internet dari PC klien dalam jaringan lokal.
· Buat Proxy Server dan jadikan Transparant Proxy, ketik :
> ip proxy set enabled=”yes” maximal-client-connections=”1000 atau maksimal_klien_yang_terkoneksi” maximal-server-connections=”1000 atau maksimal_server_yang_terkoneksi” port=”3128 atau port_proxy_server_yang_ingin_digunakan”
> ip web-proxy set parent-proxy=”ip_address:port_parent_proxy” hostname=”nama_proxy_server” port=”port_proxy_server” src-address=”ip_address_yang_digunakan_untuk_koneksi_ke_parent_proxy / default 0.0.0.0” transparent-proxy=”yes” max-object-size= “ukuran_maksimal_file_yang_akan_disimpan_sebagai_cache / default 4096 in Kilobytes” max-cache-size=”ukuran_maksimal_harddisk_yang_dipakai_sebagai_proxy_server” cache-administrators=”e-mail_administrator” enable=”yes”
· Lihat hasil konfigurasi Proxy Server, ketik :
> ip web-proxy print
· Setting firewall untuk Transparant Proxy, ketik :
> ip firewall nat add chain=”dstnat” protokol=”tcp” dst-port=”80” action=”redirect” to-port=”port_proxy_server”
· Untuk memonitoring kerja Proxy Server, ketik :
> ip web-proxy monitor
· Untuk bandwidth manajemen, dapat menggunakan sistem simple queue ataupun dengan mangle, ketik :
> queue simple add name=”nama_klien atau pc_klien_1” interface=”nama_interface_jaringan_lokal” target-address=”misal 192.168.1.3/24” max-limit=”65526/131072 dalam out/in”
> queue simple add name=”nama_klien atau pc_klien_2” interface=”nama_interface_jaringan_lokal” target-address=”misal 192.168.1.4/24” max-limit=”65526/131072 dalam out/in”
Diarsipkan di bawah: Uncategorized
Network Address Translation adalah suatu cara untuk menghubungkan jaringan private ke internet menggunakan satu IP public. Tulisan ini akan menjelaskan cara mengkonfigurasi NAT menggunakan Cisco 3640.
Konfigurasi jadingan adalah:
1. FastEthernet1 (f1/0) dengan IP 192.168.0.1. Interface ini terhubung ke jaringan yang akan di NAT
2. FastEthernet0 (f0/0) dengan IP 152.118.99.52. Interface ini terhubung ke internet.
Masuk ke mode privileged
config t
Pilih interface yang langsung terhubung dengan NAT, dan definisikan network pada jaringan ini sebagai network yang akan di NAT.
#int f1/0
#ip nat inside
Pilih interface yang langsung terhubung dengan internet, dan definisikan network ini sebagai network yang terhubung ke internet.
#int f0/0
#ip nat outside
Konfigurasikan access list untuk digunakan dalam proses NAT
access-list 2 permit 192.168.0.0 0.0.0.255
Konfigurasikan router agar me-NAT semua paket dari 192.168.0.0 ke 152.118.99.52
ip nat inside source list 10 interface f0/0 overload
Konfigurasi selesai. Cek apakah host pada jaringan 192.168.0.0 dapat terhubung ke internet. Cek juga konfigurasi NAT pada router dengan perintah
show ip nat translations *
Diarsipkan di bawah: Cisco
ICND1 VIdeo Training
Akhirnya setelah 5 tahun, CBTNuggets ngeluarin seri terbaru Video Training Cisco. Bagi yang kebelet pengen download CBTNuggets Cisco CCNA/CCENT – Exam-Pack 640-822: ICND1 silakan di
hxxp://mihd.net/6sxyu5
hxxp://mihd.net/2xbu1z
hxxp://mihd.net/fkuryb
hxxp://mihd.net/67rs3e
hxxp://mihd.net/52aj9k
hxxp://mihd.net/dzjh6x
hxxp://mihd.net/1orelg
hxxp://mihd.net/34t28r
Buat buku ICND1 dan ICND2, download aja di
hxxp://rapidshare.com/files/54630195/Cisco_Press_ICND1.rar
hxxp://rapidshare.com/files/54636549/Cisco_Press_ICND2.rar
Cat: Ganti hxxp jadi http
Diarsipkan di bawah: Cisco
Belajar Mikrotik akhir-akhir ini menjadi salah satu kesibukan liburan semester saya. Disamping ingin memenuhi salah satu target saya ditahun 2008, ketertarikan saya untuk belajar Mikrotik juga didasari adanya permintaan teman untuk membantunya dalam proses skripsinya. Target awal nggak muluk-muluk deh, cukup sharing internet (NAT), selanjutnya ingin saya lanjutkan dengan load balancing, yang rencananya akan dibuat bahan skripsi Anyikku.
Pertama, kita perlu sedikit bahas dulu apa itu NAT? terus apa kegunaan dari NAT itu sendiri?
NAT kependekan dari (Network Address Translation), berfungsi untuk menerjemahkan atau mentranslasikan IP address Private ke IP address Public. Kenapa harus di translasikan ke IP Public?
Kita tahu, ada dua jenis IP address yaitu IP Private dan IP Public. IP yang di kenal oleh
internet atau yang bisa berinternet adalah IP Public. Kalo hanya ada satu IP Public tapi ada banyak PC yang ingin terkoneksi internet, bagaimana solusinya? Maka dari itu NAT dibutuhkan. Misal kita mempunyai konfigurasi jaringan sbb:

IP Private dan IP Public di atas hanya sebagai contoh, sesuaikan dengan IP Anda.
Keterangan Skema :
- PC Router Mikrotik dengan 2 ethernet card yaitu (publik) dan (local)
- Switch/Hub
- 3 PC sebagai Client masing-masing memiliki 1 ethernet card
Alokasi IP Address
PC Router Mikrotik
Ket:
eth0 = ethernet card 1 (Publik)
IP Address : 202.159.xx.xxx
Netmask : 255.255.255.252
Gateway : 202.159.xx.xxx
DNS 1/2 : 202.159.xx.x/202.159.xx.x
eth1 = ethernet card 2 (Local)
IP Address : 192.168.0.30/27
Gateway : 202.159.xx.xxx (gateway ISP)
PC Client
Client 1 – Client n, IP Address : 192.168.0.n …. n (1-30)
Contoh:
Client 1
IP Address : 192.168.0.1/27
Gateway : 192.168.0.30 (ke PC Router Mikrotik)
Client 2
IP Address : 192.168.0.2/27
Gateway : 192.168.0.30 (ke PC Router Mikrotik)
Client 3
IP Address : 192.168.0.3/27
Gateway : 192.168.0.30 (ke PC Router Mikrotik)
Ini Ada Sedikit Catatan :
Bahwa angka dibelakang IP Address, (/27) sama dengan nilai netmasknya. Untuk angka (/27) nilai netmasknya sama dengan (255.255.255.224). Sedangkan netmask yang Saya dapat dari ISP (255.255.255.252) nilainya sama dengan (/30).
Untuk SubNetmask blok IP Address kelas C, selengkapnya dapat dijelaskan sebagai berikut :
———————————-
Subnetmask kelas C
———————————-
255.255.255.0 = 24 -> 254 mesin
255.255.255.128 = 25 -> 128 mesin
255.255.255.192 = 26 -> 64 mesin
255.255.255.224 = 27 -> 32 mesin
255.255.255.240 = 28 -> 16 mesin
255.255.255.248 = 29 -> 8 mesin
255.255.255.252 = 30 -> 4 mesin
255.255.255.254 = 31 -> 2 mesin
255.255.255.255 = 32 -> 1 mesin
———————————-
Sebelum Anda melakukan installasi, jangan lupa Anda memilih Paket Mikrotik yang Anda butuhkan nantinya. Sesuaikan dengan kebutuhan Anda.
Proses installasi mikrotik tidak memakan waktu yang lama, sesuai dengan banyaknya paket yang akan anda install, normalnya tidak sampai 15 menit jika lebih berarti kemungkinan gagal, ulangi dari awal. Setelah proses installasi selesai maka kita akan diminta untuk merestart system, tekan enter untuk merestart system.
Setelah proses instalasi selesai, maka akan muncul menu login dalam modus
terminal, kondisi sistem saat ini dalam keadaan default.
Mikrotik login = admin
Password = (kosong, langsung tekan enter saja)
Setelah login, cek kondisi interface atau ethernet card.
Melihat kondisi interface pada Mikrotik Router
[admin@Mikrotik] > interface print
Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-RATE TX-RATE MTU
0 R ether1 ether 0 0 1500
1 R ether2 ether 0 0 1500
[admin@Mikrotik]>
Jika interfacenya ada tanda X yang berarti (disabled) setelah nomor (0,1), maka periksa lagi etherned cardnya, seharusnya R yang berarti(running).
Setting IP Address, Gateway, Masqureade dan Name Server
Bentuk Perintah konfigurasi
Misalkan ether1 akan kita gunakan untuk koneksi ke Internet dengan IP 202.159.xx.xxx dan Local akan kita gunakan untuk network LAN kita dengan IP 192.168.0.30 (Lihat topologi dan konfigurasi di atas.
[admin@Mikrotik] > ip address add address=202.159.xx.xxx netmask=255.255.255.252 interface=ether1
[admin@Mikrotik] > ip address add address=192.168.0.30 netmask=255.255.255.224 interface=ether2
Melihat konfigurasi IP address yang sudah kita berikan
[admin@Mikrotik] >ip address print
Gateway
Bentuk Perintah Konfigurasi
Memberikan default Gateway, diasumsikan gateway untuk koneksi internet yang diperoleh dari ISP adalah 202.159.xx.xxx
[admin@Mikrotik] > /ip route add gateway=202.159.xx.xxx
Melihat Tabel routing pada Mikrotik Routers
[admin@Mikrotik] > ip route print
Tes Ping ke Gateway untuk memastikan konfigurasi sudah benar
[admin@Mikrotik] > ping 202.159.xx.xxx
202.159.xx.xxx 64 byte ping: ttl=64 time<1 ms
202.159.xx.xxx 64 byte ping: ttl=64 time<1 ms
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0.0/0 ms
NAT (Network Address Translation)
Bentuk Perintah Konfigurasi
ip firewall nat add chain=srcnat action=masquerade out-inteface={Ethernet yang langsung terhubung ke Internet atau Public}
Setup Masquerading, Jika Mikrotik akan kita pergunakan sebagai gateway server maka agar client komputer pada network dapat terkoneksi ke internet perlu kita masquerading.
[admin@Mikrotik] > ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade
Melihat konfigurasi Masquerading
[admin@Mikrotik] ip firewall nat print
Flags: X – disabled, I – invalid, D – dynamic
0 chain=srcnat out-interface=Public action=masquerade
Name server
Bentuk Perintah Konfigurasi
ip dns set primary-dns={dns pertama} secondary-dns={dns ke dua}
Setup DNS pada Mikrotik Routers, misalkan DNS dengan Ip Addressnya Primary = 202.159.xx.x, Secondary = 202.159.xx.x
Sebenarnya kita sudah cukup menggunakan Primary DNS nya saja. Tetapi jika Anda ingin menggunakan keduanya, tidak masalah.
[admin@Mikrotik] > ip dns set primary-dns=202.159.xx.x allow-remote-requests=yes
[admin@Mikrotik] > ip dns set secondary-dns=202.159.xx.x allow-remote-requests=yes
Melihat konfigurasi DNS
[admin@Mikrotik] > ip dns print
primary-dns: 202.159.xx.x
secondary-dns: 202.159.xx.x
allow-remote-requests: no
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 16KiB
Tes untuk akses domain, misalnya dengan ping nama domain
[admin@Mikrotik] > ping google.com
Jika sudah berhasil reply berarti seting DNS sudah benar.
Setelah langkah ini bisa dilakukan pemeriksaan untuk koneksi dari jaringan local bisa kita mulai.
DHCP Server
DHCP merupakan singkatan dari Dynamic Host Configuration Protocol, yaitu suatu program yang memungkinkan pengaturan IP Address di dalam sebuah jaringan dilakukan terpusat di server, sehingga PC Client tidak perlu melakukan konfigurasi IP Addres secara manual.
untuk melakukan pengalamatan ip address untuk client.
Bentuk perintah konfigurasi
ip dhcp-server setup
dhcp server interface = { interface yang digunakan }
dhcp server space = { network yang akan di dhcp }
gateway for dhcp network = { ip gateway }
address to give out = { range ip address }
dns servers = { name server }
lease time = { waktu sewa yang diberikan }
Jika kita menginginkan client mendapatkan IP address secara otomatis maka perlu kita setup dhcp server pada Mikrotik. Berikut langkah-langkahnya :
Menambahkan IP address pool
[admin@Mikrotik] > /ip pool add name=dhcp-pool ranges=192.168.0.1-192.168.0.30
Menambahkan DHCP Network dan gatewaynya yang akan didistribusikan ke client
Pada contoh ini networknya adalah 192.168.0.0/27 dan gatewaynya 192.168.0.30
[admin@Mikrotik] > /ip dhcp-server network add address=192.168.0.0/27 gateway=192.168.0.30 dns-server=192.168.0.30
Tambahkan DHCP Server ( pada contoh ini dhcp diterapkan pada interface Local )
[admin@Mikrotik] > /ip dhcp-server add interface=ether2 address-pool=dhcp-pool
Melihat status DHCP server
[admin@Mikrotik] > ip dhcp-server print
Flags: X – disabled, I – invalid
# NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP
0 dhcp1 ether2
Oiya, perlu saya ingatkan, Jika yang muncul adalah Tanda X yang menyatakan bahwa DHCP server belum enable maka perlu kita enablekan terlebih dahulu. Tetapi jika keluar sesuai dengan contoh di atas berarti otomatis DHCP nya sudah aktif.
Enable dhcp server
[admin@Mikrotik] > /ip dhcp-server enable 0
Kemudian untuk memastikannya cek kembali dhcp-servernya dengan melihat status DHCP servernya, jika tanda X sudah tidak ada berarti sudah aktif.
Tes Dari client (apakah sudah mendapatkan IP, kalo sudah coba juga untuk browsing)
Dengan perintah :
C:>ipconfig
C:>ping www.rickymedia.wordpress.com
Selamat Mencoba, semoga membantu.
Diarsipkan di bawah: Uncategorized
Merdeka !!!
Sudah hampir 11 th sejak krisis moneter melanda negeri ini, perubahan kearah perbaikan belum juga terlihat untuk mensejahterakan rakyat negeri ini. malah semakin memperparah keadaan negeri ini, semua coba untuk menolong tapi terdengar seperti menggonggong (lirik lagu slank). perebutan kekuasaan, korupsi, kolusi dan nepotisme makin merajarela, seakan akan semua berlomba untuk menghancurkan negeri ini. nggak yang kaya … gak yang miskin semua main sikat main embat gak ada lagi hukum di negeri ini. mungkin jika kita bisa melihat para pahlawan perebut kemerdekaan bangsa ini, mereka semua menangis, menjerit dan bersyukur tidak hidup di saat ini.
Adakan solusi tuk keluar dari keterpurukan bangsa ini ???
Penulis mencoba berandai² kembali (andai jadi presiden he he he :d). mungkin hal yang akan di lakukan oleh penulis adalah :
- Membersihkan partai² nakal (Tapi apa bisa? wong di indonesia presiden di pilih oleh partai
) ) - Membersihkan MPR/DPR (Tapi apa biasa ? yang katanya wakil rakyat tapi tidak mencerminkan aspirasi rakyat tapi partai
) - Membersihkan pejabat² tinggi pemerintahan baik daerah maupun pusat (Biang dari segala Biang
) - Membersihkan mafia pengadilan (jaksa, hakim, penuntun umum dll yang mempermainkan hukum negara, langsung hukum mati).
- Revisi hukum peradilan tentang korupsi dengan hukuman mati dan menyita seluruh aset terpidana.
- mengkelola aset² negara dengan sangat baik tuk meningkatkan pendapatan negara.
- Menggenjot pendapatan pajak (lakukan sensus menyeluruh mengenai wajib pajak)
- Membangkitkan rasa memiliki bangsa tuk menjaga segala aset sumber daya alam yang ada di bumi indonesia ( jangan sampai ada lagi penjarahan hutan, penambangan liar dll yang merugikan negara)
Semoga bangsa ini bangkit dari keterpurukan dan dapat mengamalkan UUD 45 secara baik dan benar tuk mensejahterakan rakyat negeri ini. jayalah negeri ini… jayalah negeri ini ….. merdeka !!!