VPN SERVER

Published on July 2016 | Categories: Types, Resumes & CVs | Downloads: 38 | Comments: 0 | Views: 337
of 14
Download PDF   Embed   Report

DEBIAN LENNY

Comments

Content

Install VPN Server Debian 6.0.5
VPN Server Virtual Private Networking adalah suatu metode yang digunakan untuk menghubungkan suatu LAN, menggunakan media yang berskala luas (Internet). Prinsipnya adalah membuat tunnel / terowongan, yang bersifat end to end structure. Sehingga bisa menghubungkan jaringan Lokal, walau berjarak sangat jauh. Installasi Aplikasi yang paling popular untuk VPN Server yaitu pptpd dan openvpn. Di sini saya menggunakan pptpd. # apt-get install pptpd Konfigurasi VPN Server Perlu diketahui terlebih dahulu, bahwasanya vpn server membutuhkan minimal dua interface Ethernet. Satu mengarah ke jaringan Lokal, dan yang lain mengarah ke jaringan Internet. Untuk jaringan Internet, vpn serverpun harus menggunakan Ip Public, agar bisa diakses dari mana saja. Konfigurasi untuk VPN server, terletak pada file pptpd.conf. # nano /etc/pptpd.conf #. . . localip 192.168.12.1 #ip untuk vpn server remoteip 192.168.12.100-200,192.168.12.245 #range ip untuk vpn client # or # localip 192.168.2.0 # remoteip 192.168.2.2-238,192.168.2.245 #. . . Membuat user vpn Membuat user dan password untuk VPN Client, agar bisa terkoneksi ke VPN server. # nano /etc/ppp/chap-secrets # Secrets for authentication using CHAP # client server secret IP addresses faldy pptpd faldy123 * ipul pptpd ipul123 * # /etc/init.d/pptpd restart Pengujian Coba kamu buat koneksi baru pada Network Connection > pilih Connect to My Workplace > Pilih Virtual Private Network nanti pada bagian hostname kamu isi IP dari VPN Servernya :) kalau sudah kamu konekin aja deh :) Salam IT Networking Support 2012

Instalasi dan Konfigurasi NTP SERVER LOCAL Di Debian Lenny 5.0
Minggu, Maret 27, 2011 Achmad Zulkarnain

2

Secara umum, Network Time Protocol (NTP) adalah protocol untuk meng-sinkron-kan sistem waktu pada komputer terhadap sumber (server). Terdapat beberapa situs NTP “Stratum 1″ (situs NTP dengan sumber waktu dari atomic clock) and “Stratum 2″ (situs NTP dengan sumber waktu dari situs NTP lain, dengan sedikit penurunan tingkat akurasi) yang dapat digunakan oleh publik. Namun saya akan membuat bagaimana membuat ntp server lokal, jadi tidak perlu adanya akses internet. Caranya sangat mudah: #Instalasinya# pertama masuk root console, dan install paket ntp yang dibutuhkan
# apt-get install ntp ntpdate # nano /etc/ntp.conf
edit dan tambahkan :

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help driftfile /var/lib/ntp/ntp.drift # Enable this if you want statistics to be logged. #statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable # You do need to talk to an NTP server or two (or three). #server ntp.your-provider.example # pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will # pick a different set every time it starts up. Please consider joining the # pool: <http://www.pool.ntp.org/join.html> #server 0.debian.pool.ntp.org iburst dynamic #server 1.debian.pool.ntp.org iburst dynamic #server 2.debian.pool.ntp.org iburst dynamic #server 3.debian.pool.ntp.org iburst dynamic server 127.127.1.0 iburst fudge 127.127.1.0 stratum 10 # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for # details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions> # might also be helpful. # # Note that "restrict" applies to both servers and clients, so a configuration # that might be intended to block requests from certain clients could also end # up blocking replies from your own upstream servers. # By default, exchange time with everybody, but don't allow configuration. restrict -4 default kod notrap nomodify nopeer noquery restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely. restrict 127.0.0.1 restrict ::1 # Clients from this (example!) subnet have unlimited access, but only if # cryptographically authenticated. #restrict 192.168.123.0 mask 255.255.255.0 notrust

# If you want to provide time to your local subnet, change the next line. # (Again, the address is an example only.) #broadcast 192.168.123.255 # If you want to listen to time broadcasts on your local subnet, de-comment the # next lines. Please do this only if you trust everybody on the network! #disable auth #broadcastclient
Simpan dengan mengetikkan ctrl+o Setelah itu restart program dengan mengetikan

#/etc.init.d/ntp restart
ketikkan perintah

#ntpq -p (untuk melihat hasil konfigurasi)
> *gambar ketika sudah sinkron dengan server ntp local terdapat tanda * didepan LOCAL (0)

server:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ##Memasukin ip address server:~# iptables -A INPUT -s 192.168.10.1 -j ACCEPT ##Cek PORT dalam contoh ini cek PORT Web server:~# less /etc/services | grep www # Updated from http://www.iana.org/assignments/port-numbers and other # sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . www 80/tcp http # WorldWideWeb HTTP www 80/udp # HyperText Transfer Protocol

##LIST cek tabel menampilkan semua aturan pada sebuah tabel server:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- server.local anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ##Memasukin PORT Web 80 server:~# iptables -A INPUT -p tcp --dport 80 -j ACCEPT server:~# iptables -A INPUT -p udp --dport 80 -j ACCEPT ##Memasukin PORT SSH 22 server:~# iptables -A INPUT -p tcp -s 192.168.10.1/24 --dport 22 -j ACCEPT ##Memasukin seluruh 25-110 PORT server:~# iptables -A INPUT -p tcp -m multiport --destination-port 25,110 -j ACCEPT server:~# iptables -A INPUT -p udp -m multiport --destination-port 25,110 -j ACCEPT server:~# iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT ## MeReject seluruh Konfigurasi INPUT server:~# iptables -A INPUT -j REJECT ##LIST cek tabel menampilkan semua aturan pada sebuah tabel server:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- server.local anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:www ACCEPT udp -- anywhere anywhere udp dpt:www ACCEPT tcp -- 192.168.10.0/24 anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere multiport dports smtp,pop3 ACCEPT udp -- anywhere anywhere multiport dports 25,pop3 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination ##FlushPerintah ini mengosongkan aturan pada sebuah chain server:~# iptables -F INPUT ##LIST cek tabel menampilkan semua aturan pada sebuah tabel server:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ##Cek SSH nya server:~# ssh [email protected] [email protected]'s password: Linux server 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. You have mail. Last login: Wed Mar 28 13:24:09 2012 from server.local smkntujuh@server:~$exit ##MeReject PORT 22 server:~# iptables -A INPUT -p tcp --dport 22 -j REJECT ##FlushPerintah ini mengosongkan aturan pada sebuah chain server:~#iptables -F INPUT

Konfigurasi Iptables Firewall di Router Debian 6.0.5
Firewall Firewall atau Tembok Api, berfungsi untuk memfilter semua paket yang lewat pada dirinya, baik dari jaringan Lokal ataupun Internet. Aplikasi server yang satu ini sangatlah penting, untuk melindungi jaringan local kita dari serangan luar. Aplikasi firewall yang terkenal pada linux adalah IpTables, selain itu ada juga Shorewall. Blok Incoming Packet Pada keadaan default, aplikasi IpTables telah terinstall secara otomatis saat kita menginstall system operasi Debian. Tinggal kita konfigurasi saja. Semua settingan IPTABLES terdapat pada # nano /etc/rc.local kemudian anda tinggal masukan RULE IPTABLES sebelum tulisan exit 0 a) Blok Ip yang Masuk, iptables –A INPUT –s 192.168.12.1 –j DROP b) Blok Subnet yang Masuk, iptables –A INPUT –s 192.168.12.0/24 –j DROP c) Blok Interface yang Masuk, iptables –A INPUT –o eth0 –j DROP Blok Outgoing Packet Diatas adalah beberapa konfigurasi untuk memblokir paket yang masuk, dan berikut di bawah untuk memblokir paket yang keluar. d) Blok Ip yang Keluar, iptables –A OUTPUT –d 192.168.12.1 –j DROP Blok Specified Port Dalam pembahasan selanjutnya, kita akan mengkonfigurasi pemblokiran pada port protocol tertentu. Sebelumnya, anda harus mengetahui terlebih dahulu, nama protocol beserta port yang sering digunakan. Komputer kita terdapat kurang lebih 35.000 nomor port. Dan berikut port-port yang sering dipakai. 1. FTP (21) 2. SSH (22) 3. TELNET (23) 4. SMTP (25) 5. DNS (53) 6. TFTP (69) 7. HTTP (80) 8. POP3 (110) 9. IMAP (143) 10. HTTPS (443) Sebagai permisalan, disini saya akan memblokir port FTP agar tidak bisa diakses. a) Blok Port yang Masuk, iptables –A INPUT -p tcp --dport 21 –j DROP b) Blok dari Subnet tertentu, iptables –A INPUT -s 192.168.12.0/24 –p tcp --dport 21 –j DROP Allow Specified Port Only Diatas adalah beberapa konfigurasi untuk memblokir, dan berikut jika kita mengijinkan Ip Tertentu saja yang bisa mengakses protocol tersebut. c) Ijinkan Ip tertentu, iptables –A INPUT –s 192.168.12.7 –j ACCEPT d) Ijinkan Interface tertentu untuk mengakses FTP, iptables –A INPUT –o eth1 –p tcp --dport 21 –j ACCEPT

Singkat saja dari saya tentang firewall . Jika ingin bertanya silahkan saya comment :) Salam IT Networking Support 2012 :)

Install OpenVPN di Router Debian 6.0.5
Instalasi OpenVPN ini dikerjakan pada mesin Debian. Harusnya juga bisa untuk turunan Debian lainnya seperti Ubuntu, Mint, dll. Tujuan saya menggunakan OpenVPN biasanya untuk tunneling aja, menggunakan IP address luar, mem-bypass restriksi oleh ISP, dll. Fitur enkripsi dan login menggunakan certificate akan saya disable supaya koneksi semakin ringan dan stabil. Install OpenVPN # apt-get install openvpn Copy isi konfigurasi kedalam direktori /etc/openvpn # cp -R /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/ # cp -R /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/ # cp -R /usr/share/doc/openvpn/examples/sample-config-files/client.conf /etc/openvpn/ Jika sudah kita pindah ke direktori openvpn # cd /etc/openvpn Saatnya mengkonfigurasi OpenVPN # source vars # ./clean-all # ./build-ca (dienter terus aja) # ./build-key-server server (dienter terus aja jangan lupa ketik y untuk yes) # ./build-key-pkcs12 client1 (dienter terus aja jangan lupa ketik y untuk yes) # ./build-dh Sekarang kita konfigurasi file di Routernya # gunzip server.conf.gz # nano server.conf.gz Pada bagian ini jangan hapus file yang lain . Tapi hanya dirubah saja ca /etc/openvpn/keys/ca.crt cert /etc/openvpn/keys/server.crt key /etc/openvpn/keys/server.key dh /etc/openvpn/keys/dh1024.pem Jika sudah sekarang edit file client.conf nya # nano client.conf Pada bagian ini jangan hapus file yang lain . Tapi hhanya dirubah saja remote <ip routernya> 1194 ca ca.crt cert client1.crt (sesuaikan dengan settingan pkcs12) key client1.key (sesuaikan dengan settingan pkcs12) Jika sudah pindahkan file client.conf ke direktory keys # mv client.conf keys/ Jika sudah restart OpenVPN nya # /etc/init.d/openvpn restart Sekarang kita pindah ke Client. Sebelumnya si Client harus sudah terinstall software OpenVPN Client bisa didownload disini OpenVPN Client Selain OpenVPN Client anda juga harus mempunyai software WinSCP untuk memindahkan file Enkripsi dari Router ke Client bisa didownload disini WinSCP Jika sudah terinstall 2 software tersebut sekarang saatnya minum kopi . 1. Pindahkan file yang ada di Router ke Client dengan menggunakan WinSCP. Cara menggunakan software ini seperti Putty tinggal memasukan IP Address yang ingin di remote kemudian masuk Port yang dipakai biasanya Port 22 kemudian Enter 2. Pindahkan direktori pada WinSCP yang ada di Router ke /etc/openvpn/keys/ 3. Kemudian copy file ca.crt , client1.crt , client1.key , client.conf ke desktop client atau folder client lainnya sesuka anda kalau bisa jadikan dalam 1 folder 4. Jika sudah close WinSCP nya dan Rename file client.conf menjadi client.ovpn

5. Pindahkan ke-4 file tersebut kedalam C:\Program Files\OpenVPN\config 6. Jalankan software OpenVPN Gui yang ada di desktop dan klik kanan pada sistem tray nya (pojok kanan bawah dekat tanggalan) lalu klik Connect 7. Tunggu sampai berhasil dan berwarna hijau berarti OpenVPN Router sudah berhasil :) Jika merasa kesulitan anda bisa comment :) Salam IT Networking Support FAIR PLAY LKS Jateng 2012

The official web site is not www.squid.org as may be expected, but http://www.squid-cache.org. Squid Installation #apt-get install squid Configuration The squid configuration can be found in /etc/squid/squid.conf Configuration Sections Explained Below General http_port 3128 icp_port 3130 htcp_port 4827 cache_mem 16 MB refresh_pattern . 0 20% 8640 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY # snews 563 # gopher 70 # wais 210 acl www_ports 80 443 acl ftp_ports 21 acl localhost src 127.0.0.1/32 acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl CONNECT method CONNECT acl PURGE method PURGE http_access http_access http_access http_access Specials acl executables url_regex [.]exe$ http_access deny executables authenticate_program /usr/lib/squid/smb_auth -W DOMEIN -U SERVER acl network proxy_auth REQUIRED http_access allow users network cache_peer proxy1.test.net parent 3128 7 no-query default HTTP acl wwwusers src 192.168.2.0/24 http_access allow wwwusers www_ports FTP ftp_user [email protected] ftp_passive off acl ftpusers src 192.168.2.0/24 http_access allow ftpusers ftp_ports Deny all never_direct allow all always_direct deny all allow manager localhost deny manager allow PURGE localhost deny PURGE

http_access deny all icp_access allow all miss_access allow all

Konfigurasi Router Debian 5 Lenny
Posted by Rangga0 komentar

Berikut ini merupakan Langkah Konfigurasi Router Sederhana berbasis Debian 5 Lenny Misalkan kita menentukan IP untuk interface sbb : - Interface Eth0 (untuk koneksi ke internet) : IP : 10.20.1.1 Submask : 255.255.255.0 Gateway : 10.20.1.1 - Interface Eth1 (untuk koneksi ke Local Network) IP : 192.168.1.1 Submask : 255.255.255.0 Langkah-langkah untuk mengKonfigurasi Router berbasis Debian 5 Lenny adalah sebagai berikut : 1. Set IP masing-masing Interface Command : # nano /etc/network/interface Edit file sebagai berikut : allow-hotplug eth0 iface eth0 inet static address 10.20.1.1 netmask 255.255.255.0 network 10.20.1.0 broadcast 10.20.1.255 gateway 10.20.1.1 iface eth1 inet static address 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 2. Konfigurasi Routing IPTABLES Command : # nano /etc/rc.local Tambahkan : echo 1 > /proc/sys/net/ipv4/ip_forward iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE

Perintah di atas berfungsi agar setting IPTABLES tidak berubah saat PC Restart. 3. Cek Konfigurasi IPTABLES Command : # iptables –nL –t nat 4. Konfigurasi IP Forward Command : # nano /etc/sysctl.conf Lalu hilangkan tanda pagar (#) yang ada di depan komentar berikut : #net.ipv4.conf.default.rp_filter=1 #net.ipv4.ip_forward =1 #net.ipv4.conf.default.forwarding=1 Selesai…. Router Sederhana siap digunakan ,.,., gampang kaN ,.,

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close