IKLAN

Theme images by kelvinjay. Powered by Blogger.

Tutorial

HEBOH

Kuliner

Youtube Tutorial

Games

Lowongan Kerja

OpenSource

» » » » Cara Share Internet dengan SSH di Linux Part II

jika sebelumnya sudah saya jelaskan trik share wifi di linux menggunakan ssh,maka kali ini saya akan mencoba share trik kedua, tujuanya sebagai dokumentasi pribadi saja, jika sewaktu-waktu linux saya uninstall/error

oke, langkah pertama
1. install amunisinya
apt-get install dhcp3-server hostapd

2. configurasi hostapd.conf
cd ~
nano hostapd.conf 
isi dengan script berikut

interface=wlan0
driver=nl80211
ssid=microssh
channel=1
hw_mode=g
auth_algs=1
wpa=3
wpa_passphrase=ilovemasha
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP


3. Konfigurasi Interface

# The loopback network interface
auto lo
iface lo inet loopback

# Host-only interface
auto eth1
iface eth1 inet static
        address         192.168.150.1
        netmask         255.255.255.0
        network         192.168.150.0
        broadcast       192.168.150.255

# NAT interface
auto eth2

auto wlan0
iface wlan0 inet static
address 10.10.0.1
netmask 255.255.255.0

4. konfigurasi dhcpd.conf
nano /etc/dhcp/dhcpd.conf


subnet 10.10.0.0 netmask 255.255.255.0 {
range 10.10.0.2 10.10.0.16;
option domain-name-servers 8.8.4.4, 8.8.8.8;
option routers 10.10.0.1;
}

4. ip forwarder
nano /etc/sysctl.conf

hapus tanda # depan script
net.ipv4.ip_forward=1

5. setting firewall
nano /etc/rc.local
iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o tun0 -j MASQUERADE

6. automatic script
nano sh start.sh


#!/bin/bash
# Start
hostapd /etc/hostapd.conf

7. jalankan share wifi
sh start.sh



«
Next
Newer Post
»
Previous
Older Post