Re: Adding Wireless support to existing network

From: Mike Gleason Jr Couturier (mikejrMAPSON_at_videotron.ca)
Date: 05/31/04


Date: Mon, 31 May 2004 09:10:04 -0400

Thank you very very much great script and
explanations !!

Mike

"Peter Mueller" <nnn79@gmx.NOSPAM.net> wrote in message
news:1c5f9c.eql.ln@electro.chillomatic...
> "Mike Gleason Jr Couturier" wrote:
>
>
> > Can I assign IP 192.168.1.2 to the wireless adapter on my FreeBSD
> > gateway and tell dnsmasq to serve (DHCP/DNS) on the wi0 interface too
> > ? Then I would need to bridge for the wireless clients to be able to
> > ping/access
> > wired clients.. is that it ? I just want wireless client and wired
> > client all act
> > like if it was a wired only network...
>
> Yes, you need bridging.
>
>
> > I found tutorials on the net about creating an access point for
> > wireless clients but not with hybrid configuration...
> >
> > I'm little confused ! Is there someone patient enough to explain me
> > what I sould do / look for ?
>
> What you want is already done by me (same wifi card and same FBSD
> version) :-).
>
> I created my script with the help of the great sites:
> http://www.unixcircle.com/features/802.11b_freebsd.php
> http://stevenfettig.com/mythoughts/archives/000072.php
>
>
> You can generate your not-so-easy-to-crack ESSID with:
>
> # openssl rand 16 | hexdump -e '"%02x"'
>
>
> And your four not-so-easy-to-crack wep keys with:
>
> # openssl rand 13 | hexdump -e '"%02x"'
>
>
> If you want to try the script for testing purposes first without
> encryption, set "WLAN_WEP_ENABLED=0" in the script.
>
>
> This is my working hostap start script:
>
>
>
>
> #!/bin/sh
> #
> #
> # ----------------------------------------
> # /usr/local/etc/rc.d/host_ap.sh
> # ----------------------------------------
>
>
> # ----------------------------------------
> # Configurations.
> #
> #
> IFCONFIG="/sbin/ifconfig"
> WICONTROL="/usr/sbin/wicontrol"
> SYSCTL="/sbin/sysctl"
> WLAN_INTERFACE=wi0
> WLAN_MEDIA=DS/11Mbps
> WLAN_MEDIAOPT=hostap
> WLAN_MAC="00:09:5b:xx:xx:xx"
> WLAN_ESSID=8dddddddddddeeeeeeeeeeefffff004
> WLAN_WEP_KEY1=aaaaaaaaaaaaaaaaaaaaaaaaaa
> WLAN_WEP_KEY2=bbbbbbbbbbbbbbbbbbbbbbbbbb
> WLAN_WEP_KEY3=cccccccccccccccccccccccccc
> WLAN_WEP_KEY4=dddddddddddddddddddddddddd
> WLAN_WEP_ENABLED=1
> WLAN_WEP_WHICH_KEY=1
> WLAN_CHANNEL=11
> WLAN_STATION_NAME="FreeBSD_WLAN"
> ZERO_IP="0.0.0.0"
>
> # --------------------
> # Set the port type.
> #
> # (1=BSS, 3=ad-hoc, 6=Host AP)
> #
> # !!!!!! We need type "6"! !!!!!!
> #
> WLAN_STATION_TYPE=6
>
> # --------------------
> # Set the LAN interface.
> #
> LAN_INTERFACE=rl0
>
>
> # ----------------------------------------
> # The script.
> #
> case "$1" in
>
> start)
>
> # ----------------------------------------
> # Configure the WLAN access point mode.
> #
> # GENERATING ESSID:
> #
> # # openssl rand 16 | hexdump -e '"%02x"'
> #
> # EXAMPLE:
> #
> # Configure the access point mode and call it my_wifi as
> # the network name (ssid):
> #
> # ifconfig wi0 inet up 0.0.0.0 ssid my_wifi media DS/11Mbps \
> # mediaopt hostap
> #
> # !!! The following "$IFCONFIG $WLAN_..." should be ONE LINE !!!
> #
> $IFCONFIG $WLAN_INTERFACE inet up $ZERO_IP ssid $WLAN_ESSID media \
> $WLAN_MEDIA mediaopt $WLAN_MEDIAOPT
>
> # ----------------------------------------
> # Setting the MAC.
> #
> #
> $WICONTROL $WLAN_INTERFACE -m $WLAN_MAC
>
> # ----------------------------------------
> # Define four 128-bit WEP keys.
> #
> # GERNERATING WEP-KEYS:
> #
> # # openssl rand 13 | hexdump -e '"%02x"'
> #
> #
> $WICONTROL $WLAN_INTERFACE -k 0x$WLAN_WEP_KEY1 -v 1
> $WICONTROL $WLAN_INTERFACE -k 0x$WLAN_WEP_KEY2 -v 2
> $WICONTROL $WLAN_INTERFACE -k 0x$WLAN_WEP_KEY3 -v 3
> $WICONTROL $WLAN_INTERFACE -k 0x$WLAN_WEP_KEY4 -v 4
>
> # ----------------------------------------
> # Turn on WLAN Wired Equivalent Privacy (WEP).
> #
> #
> $WICONTROL $WLAN_INTERFACE -e $WLAN_WEP_ENABLED
>
> # ----------------------------------------
> # Specify WEP key to be used to encrypt transmitted packets:
> #
> #
> $WICONTROL $WLAN_INTERFACE -T $WLAN_WEP_WHICH_KEY
>
> # ----------------------------------------
> # Choose the used WLAN Channel.
> #
> # (Non-overlapping channels are: 1,6,11)
> #
> #
> $WICONTROL $WLAN_INTERFACE -f $WLAN_CHANNEL
>
> # ----------------------------------------
> # Define WLAN station name.
> #
> #
> $WICONTROL $WLAN_INTERFACE -s $WLAN_STATION_NAME
>
> # ----------------------------------------
> # Using Infrastructur mode (BSS mode).
> #
> #
> $WICONTROL $WLAN_INTERFACE -p $WLAN_STATION_TYPE
>
> # ----------------------------------------
> # Bridge WLAN to ethernet world.
> #
> #
> $SYSCTL net.link.ether.bridge=1
> $SYSCTL net.link.ether.bridge_cfg="$WLAN_INTERFACE $LAN_INTERFACE"
> $SYSCTL net.link.ether.bridge_ipfw=1
> echo ' WLAN: Started. '
> ;;
>
> stop)
>
> # ----------------------------------------
> # Disable the WLAN access point mode.
> #
> $SYSCTL net.link.ether.bridge=0
> $SYSCTL net.link.ether.bridge_cfg=""
> $SYSCTL net.link.ether.bridge_ipfw=0
> $IFCONFIG $WLAN_INTERFACE down
> echo ' WLAN: Stopped. '
> ;;
>
> restart)
>
> $0 stop
> $0 start
> ;;
>
> *)
>
> echo ""
> echo "Usage: `basename $0` { start | stop | restart}"
> echo ""
> exit 64
> ;;
>
> esac
> # ----------------------------------------
>
>
>
> AFTERWARDS:
>
> # chmod 0700 /usr/local/etc/rc.d/host_ap.sh
>
>
> START:
>
> # /usr/local/etc/rc.d/host_ap.sh start
>
>
> CHECK:
>
> # wicontrol
>
>
>
> Okay, HTH.
>
>
> >
> > Thank a lot !
> >
> > Mike
> >
>
> --
> greets
>
> Peter
> nnn79 __at__ gmx.net



Relevant Pages

  • Re: Stop page going back to the top when submitting
    ... Cheers, Mike. ... > manually register some clientside script and use clientside element's ... > "focus" script function to se the focus. ... > Microsoft Online Support ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: are you indirect, I mean, feeding because of encouraging citizens
    ... Mike to revive it. ... These days, go rebuild a script! ... What doesn't Milton commit ...
    (sci.crypt)
  • Re: freebsd-questions Digest, Vol 93, Issue 17
    ... >> Option has been set up so that the serial console replaces one of the ... >> Mike I also tried to use only following line in install.cfg ... > run the script instead would clear it up. ... >> Even though it doesn't seem to work from the command line, ...
    (freebsd-questions)
  • Re: Stop page going back to the top when submitting
    ... manually register some clientside script and use clientside element's ... "focus" script function to se the focus. ... Microsoft Online Support ... | Cheers, Mike. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Windows CE??
    ... > Hallo Mike, ... >> gibt es sowas auch für WLan? ... > Dazu dann die üblichen Schnittstellen, wie über Dockingsstation, die per ... > USB am PC hängt, oder WLAN mit Zusatzkarte, Infrarot oder teilweise mit ...
    (microsoft.public.de.fox)