Page 1 of 15 12311 ... LastLast
Results 1 to 10 of 146
  1. #1
    Untangle Ninja Silver Bullet's Avatar
    Join Date
    Sep 2007
    Posts
    1,946

    Default How To: Make your Untangle Server a Wireless Access Point

    THIS WILL NOT WORK IN 6.1... PLEASE WAIT FOR UPDATED INSTRUCTIONS

    I have been running this since 5.1 beta 1 and it has been very stable and thought I would post how I did it in case someone else wants to do it.

    To begin with, you will need a wireless card that is supported by the madwifi driver. The one I am using is an Atheros based card. To be specific, this is the card I am using. Got it for under $25.
    http://www.engeniustech.com/datacom/...ls.aspx?id=223

    So, let's get started with the disclaimer.
    Disclaimer: Perform this at your own risk. While I was careful in constructing these instructions, they may not be perfect. The instructions below were made so you would only have to copy and paste them into a terminal. If your Untangle Gremlins leave and your server no longer runs, then you have been warned and I accept NO responsibility. These were made for Untangle 5.1. DO NOT USE THIS ONE IN 5.03

    Now that we have that out of the way.

    First we are going to backup our original sources.list, add Ubuntu Gutsy repos and update in one whack. So just copy everything you see in this window, paste it and hit enter.

    Edit: Run this first
    Code:
    sed -i -e 's/APT::Cache-Limit 10000000/APT::Cache-Limit 20000000/' /etc/apt/apt.conf
    Code:
    cp /etc/apt/sources.list /etc/apt/sources.list.orig
    
    echo "deb http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted" >>/etc/apt/sources.list
    echo "deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted" >>/etc/apt/sources.list
    
    echo "deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted" >>/etc/apt/sources.list
    echo "deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted" >>/etc/apt/sources.list
    
    echo "deb http://us.archive.ubuntu.com/ubuntu/ gutsy universe" >>/etc/apt/sources.list
    echo "deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy universe" >>/etc/apt/sources.list
    echo "deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe" >>/etc/apt/sources.list
    echo "deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe" >>/etc/apt/sources.list
    
    echo "deb http://us.archive.ubuntu.com/ubuntu/ gutsy multiverse" >>/etc/apt/sources.list
    echo "deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy multiverse" >>/etc/apt/sources.list
    echo "deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse" >>/etc/apt/sources.list
    echo "deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse" >>/etc/apt/sources.list
    
    echo "deb http://security.ubuntu.com/ubuntu gutsy-security main restricted" >>/etc/apt/sources.list
    echo "deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted" >>/etc/apt/sources.list
    echo "deb http://security.ubuntu.com/ubuntu gutsy-security universe" >>/etc/apt/sources.list
    echo "deb-src http://security.ubuntu.com/ubuntu gutsy-security universe" >>/etc/apt/sources.list
    echo "deb http://security.ubuntu.com/ubuntu gutsy-security multiverse" >>/etc/apt/sources.list
    echo "deb-src http://security.ubuntu.com/ubuntu gutsy-security multiverse" >>/etc/apt/sources.list
    
    apt-get update
    Now let's install what we can with apt.
    Code:
    apt-get install make build-essential wireless-tools
    Code:
    apt-get install linux-headers-$(uname -r)
    Code:
    apt-get install hostapd
    We can now restore the original sources.list since we have installed what we need from apt.
    Code:
    cp /etc/apt/sources.list.orig /etc/apt/sources.list
    rm /etc/apt/sources.list.orig
    Now let's get the madwifi drivers and put them in /tmp to build
    Code:
    cd /tmp
    Download the madwifi drivers
    Code:
    wget http://downloads.sourceforge.net/madwifi/madwifi-0.9.4.tar.gz?modtime=1202880185&big_mirror=0
    Code:
    tar zxf madwifi-0.9.4.tar.gz
    Code:
    cd madwifi-0.9.4
    Code:
    make
    Code:
    make install
    Code:
    modprobe ath_pci
    Code:
    ifconfig ath0 up
    At this point, you should have a new interface that shows up in ifconfig. Now llet's make Untangle aware of it. To do this, you need to:
    Browse to http://ipaddressofuntangle/alpaca. Make sure you are in Advanced mode.
    Click the interfaces tab
    click refresh (Alpaca should report your new interface(s)
    Click Save

    Now, back on the interfaces tab, click edit to edit the ath0 interface.
    Configure it to bridge to your internal interface
    Click Save.

    Now the bridge information is loaded into /etc/network/interfaces automatically by Alpaca.

    Here we are going to have to manually edit /etc/network/interfaces so that our new interface will come up in master mode and will be on the channel we want. To do this, paste the following between the eth0 and br.eth1 entries.

    Code:
    auto ath0
    iface ath0 inet manual
            pre-up wlanconfig ath0 destroy
            pre-up wlanconfig ath0 create wlandev wifi0 wlanmode ap
            post-down wlanconfig ath0 destroy
    	pre-up iwconfig ath0 channel 11
    	wireless-mode master
    Almost finished.
    Last thing to do is add security to our Wireless Access Point. To do this, we are going to use the hostapd package that we installed earlier.

    First, let's allow hostapd to automatically start.
    Code:
    cd /etc/default
    Code:
    sed -i -e 's/#RUN_DAEMON="yes"/RUN_DAEMON="yes"/' hostapd
    Code:
    perl -i -pe 's/^#DAEMON_CONF/DAEMON_CONF/' hostapd
    Now the last file is going to take some manual editing in order to set your SSID and Security you want. I suggest making a copy of the original and then creating your own so that you have the original to reference. To create a copy of it just do
    Code:
    cp /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.conf.orig
    Then edit /etc/hostapd/hostapd.conf to suit your needs. Each setting is documented very well in the conf file.

    If you run into problems with the hostapd.conf, then post here and I will try to help. Googling "hostapd.conf" should also help though.

    Here is a sample config of hostapd found in /etc/hostapd/hostapd.conf
    Code:
    interface=ath0
    bridge=br.eth1
    driver=madwifi
    logger_syslog=-1
    logger_syslog_level=2
    logger_stdout=-1
    logger_stdout_level=2
    debug=0
    dump_file=/tmp/hostapd.dump
    ctrl_interface=/var/run/hostapd
    ctrl_interface_group=0
    ssid=Untangle
    auth_algs=3
    eapol_key_index_workaround=0
    eap_server=0
    wpa=3
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=TKIP CCMP
    wpa_passphrase=secret passphrase!
    Once you have your hostapd.conf set how you like it, REBOOT and your new Wireless AP should be up and going.

    Note: Since you manually edited /etc/network/interfaces, if you make a save in Alpaca interface tab, then your edit will be overwritten. So, be sure that you have your interfaces set how you like them.

    Now that the Wireless is up and running, you need to create the following port forward, packet filter and bypass rule so that both your internal and wireless will be as one.
    >>>See Attached Screen Shots<<<

    The Port Forward rule should look EXACTLY like the screen shot... forward to 192.0.2.42.

    The Packet Filter rule needs to have the destination address of your internal interface.

    The Bypass Rule should be your network address in the source and destination


    This may look like it takes a long time, but it really doesn't. I usually knock this out pretty quickly after the initial install.

    DHCP and DNS

    If you want Untangle to provide these services, then go to the Alpaca interface Advanced > Packet Filter
    DHCP > Uncheck Block all DHCP Requests to the local DHCP Server.

    DNS > Check Accept DNS traffic from the Internal and VPN interfaces to the local DNS Server.

    Good Luck and happy wireless networking.
    Last edited by Silver Bullet; 04-16-2009 at 07:04 AM.

  2. #2
    Newbie
    Join Date
    Mar 2008
    Posts
    4

    Default trouble with apt-get-update and make

    apt-get update

    Reading Package Lists... Error!
    E: Dynamic MMap ran out of room
    E: Error occured while processing xfce4-iconbox (NewVersion1)
    E: Problem with MergeList /var/lib/dpkg/status
    E: The package lists or status file could not be parsed or opened.

    durring ap-get update is does a number of packages and then says....i have a 40gb hd and 512mb ram....do you have any ideas?

  3. #3
    Untangle Ninja Silver Bullet's Avatar
    Join Date
    Sep 2007
    Posts
    1,946

    Default

    Yeah... I did a fresh install the other day and the same thing happened. The Apt cache isn't large enough.

    Just run this and it should take care of it... if you haven't already changed the Apt Cache.

    Code:
    sed -i -e 's/APT::Cache-Limit 10000000/APT::Cache-Limit 20000000/' /etc/apt/apt.conf
    now do apt-get update

  4. #4
    Newbie
    Join Date
    Mar 2008
    Posts
    4

    Default USB Nic

    does this work with a USB NIC or only pci?

  5. #5
    Untangle Ninja Silver Bullet's Avatar
    Join Date
    Sep 2007
    Posts
    1,946

    Default

    I don't *think* that madwifi supports usb devices. But, if your usb device can be put into master mode then everything else should work. Just leave the madwifi part out.

    Which one are you using?

  6. #6
    Newbie
    Join Date
    Mar 2008
    Posts
    4

    Default

    its a usb netgear wg111...

  7. #7
    Untangle Ninja Silver Bullet's Avatar
    Join Date
    Sep 2007
    Posts
    1,946

    Default

    Have you got that one to work in linux before? If so, how? NDISWRAPPER?

  8. #8
    Newbie
    Join Date
    Mar 2008
    Posts
    4

    Default

    no i have not, i am new to Linux ... and untangle. does Linux not like netgear usb? is there something you recommend?

  9. #9
    Untangle Ninja Silver Bullet's Avatar
    Join Date
    Sep 2007
    Posts
    1,946

    Default

    I am personally using the one that I posted in my original post and I am pleased with it.

  10. #10
    Untanglit
    Join Date
    Jan 2008
    Posts
    16

    Default

    Nice work Silver, will this be added to Untangle as a update one day?

Page 1 of 15 12311 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2