[Share] Install Samba di Pfsense 2.0.1



  • Sekedar sharing barangkali bisa bermanfaat bagi teman-teman yang ingin menginstal samba di Pfsense 2.0.1.

    ubah repository :
    –> setenv PACKAGESITE http://e-sac.siteseguro.ws/packages/8/All/

    Hapus dulu openldap-client-2.4.25_2 dan cyrus-sasl-2.1.23_3, nanti akan diganti dengan cyrus-sasl-2.1.25_1 openldap-sasl-client-2.4.26 sesuai permintaan samba36-3.6.3

    --> pkg_delete -f openldap-client-2.4.25_2
    --> pkg_delete -f cyrus-sasl-2.1.23_3

    Install samba
    --> pkg_add -r samba36-3.6.3

    Install package heimdal
    --> pkg_add -r heimdal-1.4_1

    Karena pfsense akan menghapus folder di /var/run/samba yang berisi pid smbd, nmbd, dan winbindd ketika reboot, maka edit file rc.conf.local

    ee /etc/rc.conf.local
    Isikan :

    -->  [ -d /var/run/samba ] || mkdir /var/run/samba
    chmod -R 0755 /var/run/samba
    samba_enable="Yes"
    nmbd_enable="Yes"
    smbd_enable="Yes"
    winbindd_enable="Yes"

    edit file /usr/local/etc/smb.conf sesuaikan dengan kebutuhan

    Start service samba
    –> service samba start

    Jika ingin samba berjalan otomatis, maka buat samba.sh dengan mengcopy file samba di /usr/local/etc/rc.d/samba
    --> cp /usr/local/etc/rc.d/samba /usr/local/etc/rc.d/samba.sh

    Moga bermanfaat.



  • mhn bantuan untuk menambah user samba bagaimana…?
    saya udah coba pake

    smbpasswd -a [user]

    hasilnya : failed to add entry for user …

    Treimakasih atas post samba nya..



  • @abnisrea:

    mhn bantuan untuk menambah user samba bagaimana…?
    saya udah coba pake

    smbpasswd -a [user]

    hasilnya : failed to add entry for user …

    Treimakasih atas post samba nya..

    –> pw useradd coba

    --> smbpasswd -a coba
    New SMB password:
    Retype new SMB password:
    Added user coba.

    Cek user :
    --> tdbdump /usr/local/etc/samba/passdb.tdb | grep USER



  • makasih banyak atas panduannya tapi ada sedikit pertanyaan

    ee /etc/rc.conf.local
    Isikan :

    –>  [ -d /var/run/samba ] || mkdir /var/run/samba
      chmod -R 0755 /var/run/samba
      samba_enable="Yes"
      nmbd_enable="Yes"
      smbd_enable="Yes"
      winbindd_enable="Yes"

    itu yg diblok merah diisikannya dari  –>  [ -d /var/run/samba ] || mkdir /var/run/samba
    atau ada penjelasannya..

    tks



  • @abnisrea:

    makasih banyak atas panduannya tapi ada sedikit pertanyaan

    ee /etc/rc.conf.local
    Isikan :

    –>  [ -d /var/run/samba ] || mkdir /var/run/samba
      chmod -R 0755 /var/run/samba
      samba_enable="Yes"
      nmbd_enable="Yes"
      smbd_enable="Yes"
      winbindd_enable="Yes"

    itu yg diblok merah diisikannya dari  –>  [ -d /var/run/samba ] || mkdir /var/run/samba
    atau ada penjelasannya..

    tks

    Pada waktu psfense restart, dia akan menghapus folder /var/run/samba, padahal samba gak akan jalan tanpa folder itu. Untuk itu pada waktu booting kita minta samba membuat folder itu lagi dengan menambahkan script di /etc/rc.conf.local.

    [ -d /var/run/samba ] || mkdir /var/run/samba



  • Mantaaaab dah aku ikutun caranya dan berjalan lancar..
    Terima kasih berat panduannya..

    tapi… ;) mw tanya lagi,
    aku dah masukin user nya dah bisa masuk ke folder yg dishare
    tapi aku gx bisa tulis/edit/hapus..
    bisa dibantu seting share folder di smb.conf nya..

    tks



  • @abnisrea:

    Mantaaaab dah aku ikutun caranya dan berjalan lancar..
    Terima kasih berat panduannya..

    tapi… ;) mw tanya lagi,
    aku dah masukin user nya dah bisa masuk ke folder yg dishare
    tapi aku gx bisa tulis/edit/hapus..
    bisa dibantu seting share folder di smb.conf nya..

    tks

    Jika ingin folder yg dishare dapat diakses tanpa  login dan bisa read n write, ubah konfigurasi smb.conf :
    security = user
    ganti dengan :
    security = share



  • Sekedar menambahi saja, mungkin ada yg belum tahu samba  ;D  ???.

    samba adalah server yang melayani file sharring. inti nya itu kalo soal fungsi yang lain itu tergantung penggunannya.
    selain samba bisa juga menggunakan freenas, tapi masih kesulitan menginstall (jadiin paket pf) mesti harus pakai komp terpisah.

    nb:
    untuk membatasi jumlah user yang mengakses di smb.conf bisa ditambahi

    max connections = 10 (misal 10 user)



  • nah makin mantab ada pak de.. ulas juga dong freenas nya pak de.. web server n ftp servernya.. sehingga lengkap sudah pFsense nya.. untuk Indonesia n khususnya dunia Pendidikan Indonesia..
    Salut untuk rekan-rekan yg memberikan ilmunya bagi orang banyak..

    Seperti pepatah : Ilmu yg bermanfaat adalah Ilmu yg selalu hidup pada penerimanya dan diteruskan treusssssssssssssss pd yg memerlukannya..

    Bukan menggurui para Sesepuh..

    Maju pFsense Indonesia Maju Bangsa Indonesia



  • Karena saya LEBIH menyukai pfsense sebagai Firewall Murni sedangkan untuk server Data saya lebih menyukai TERPISAH dengan pfsense. (alasannya hanya sederhana, Just only Mitigations of Risk saja)

    Namun demikian, jika ada yang menyukai pfsense + gado-gado sesuai keperluannya ini ada tutorial singkat padat jelas dan berjalan, yang saya ambil dari sumbernya :

    a howto get a full functioning webserver on pfsense via vhost

    @sash99:

    A requested HowTo

    For those that wish to have a  functional webserver on   their pfsense router/firewall to handle content internally ( or otherwise)
    I simplified it as easy as possible

    Installing  the packages and  preparing  pfsense  vhost
    ( from a clean install)

    go to system > packages

    install BandwidthD ( installs most of GD libaries)
    install Vhost

    then go to System > advance

    give pfsense a  non standard TCP port ie: 11111  (  do not forget  to be able to log into pfsense  you have to add  the port number to your  ip ie:  https://192.168.1.1:11111)
    disable WebGUI redirect
    enable secure shell

    you should now be able to use port 80 as your webserver port ( internal (lan) and externally (wan) )

    now use putty  or terminal to  ssh into pfsence
    ie: ssh root@192.168.1.1

    go to shell (8 )
     
    copy and paste each line  to shell command line  and press enter   ( any deviation can break pfsense)

    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/php52-gd-5.2.13_3.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/t1lib-5.1.2_1,1.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/libX11-1.3.3,1.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/libXpm-3.5.7.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/libxcb-1.6.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/libXau-1.0.5.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/libXdmcp-1.0.3.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/libpthread-stubs-0.3_3.tbz
    pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/mysql-server-5.1.48.tbz
    pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/mcrypt-2.6.8_1.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/php52-mcrypt-5.2.13_3.tbz
    pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/libltdl-2.2.6b.tbz

    touch /etc/php_dynamodules/pdo                                                                        
    touch /etc/php_dynamodules/pdo_sqlite                                                                  
    touch /etc/php_dynamodules/gd  
    touch /etc/php_dynamodules/mysql
    touch /etc/php_dynamodules/json        
    touch /etc/php_dynamodules/mcrypt
    touch /etc/php_dynamodules/dom
    touch /etc/php_dynamodules/sqlite

    /etc/rc.php_ini_setup

    /usr/local/bin/mysql_install_db
    chmod 777 /var/db/mysql
    chmod 777 /var/db/mysql/mysql
    chmod 777 /var/db/mysql/mysql/.
    mv /usr/local/etc/rc.d/mysql-server /usr/local/etc/rc.d/mysql-server.sh

    now if you are  familar with vi  continue  to enter this line and then edit the following

    vi /usr/local/etc/rc.d/mysql-server.sh

    changed
    : ${mysql_enable="NO"}
    to
    : ${mysql_enable="YES"}

    save the file

    I am not so great at vi  so I usually use filezilla log into the server  and use the ftp program to edit the  file

    to log in pfsense with filezilla  the user name is not admin it is always root and the port is 22 –
    then negotiate to  /usr/local/etc/rc.d and edit the file mysql-server.sh

    once the line is edited

    exit
    restart webconfiguator ( 11 )
    reboot ( 5 )

    once it reboots  ssh into it again  and give mysql a password

    mysqladmin -u root password "your new password"

    now you have a fully functioning webserver on PFsense

    To get the web Server  running  ( vhost)

    services > vhosts

    click add +
    Host:  create a simple name ie: info   or admin  this will create a folder in your web server directory
    ip address;  assign this to  to your wan,  lan, opt   or virtual ip that you created on your system
    post the default is 8001   but if you disabled Webgui redirect as mentioned above then you can use  port  80 ( I would suggest if it some form of administration website use a non standard port)
    Directory  leave this one blank on some installs  it breaks vhost  if you enter  in anything  
    Certificate & key also leave blank unless you want https website

    now start the vhost services

    status > services
    click start  vhost  
    ( it will not change to green status  but it is  functioning )

    test  web server

    enter in  ip plus directory name in browser
    ie: Ip 192.168.1.1
    if using  port 8001 and the host is called info  –   http://192.168.1.1:8001/info
    if using  port 80 and host is called admin –   http://192.168.1.1/admin
    or you can use servers host name ie:  http:// pfsense.localdomain/admin

    It should display a PHP  webpage describing what php module you have installed

    Uploading your website
    install filezilla or similar program that can handle sftp –  http://filezilla-project.org/
    host: ip of your pfsense box
    user name root  
    password  whatever your password is for you pfsense box
    port 22

    negotiate your way to vhost directories /usr/local/vhosts

    copy your php or html websites to your  host directory

    your DONE

    test to see if the website works

    Useful  php websites

    to maintain mysql  create vhost  and install phpmyadmin ( probably not on port 80 for security reasons)

    http://www.phpmyadmin.net

    other usefull programs:
    server monitor
    http://sourceforge.net/projects/phpservermon/

    a very good content manager
    www.joomla.org

    and much much more

    Good luck and have fun  ;D

    sumber : http://forum.pfsense.org/index.php/topic,47086.0.html

    ATAU lewat advance >> package >> vHosts

    Semoga bermanfaat. :)

    p'Dhe Sastro



  • cara install samba mudah cepat dari om cudy fernadez

    fetch http://pfsense-cacheboy.googlecode.com/svn/trunk/script/samba_install.sh && chmod a+x samba_install.sh && ./samba_install.sh

    redy..
    ;D


Log in to reply