Jump to content

raspberry pi b+ as a dhcp server/repeter? <--alfa r36


Recommended Posts

so, at the moment im waiting on a awus036h to show up in the mail for use with my alfa-r36 to complete the repeter setup...

i plan on comparing bandwidth upload and download speed test's... (My source access point is a long distance away)

my current repeter setup.

ddwrt running on a old linksys router, old and limited on ram etc... i plan on replacing this with alfa-r36 + awus036H (still waiting, not yet tested)....

So, what i have avalible to me at the moment

raspberry pi b+ kali installed



So, my raspberry pi has the alfa NHA associated with the accesspoint from a long distance... ping google seems strong... now i would like to broadcast a new wifi network with my alfa-r36... i figured i could start up dhcpd and plug r36 into the pi threw ethernet?

seems that i need help configuring dhcpd... at this point im lost...

What does work currently, i can plug the alfa-r36 as (bridged ap mode) directly into the ddwrt...

Link to comment
Share on other sites

iptables --flush
Iptables --table nat --flush
iptables --delete-chain
Iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE

iptables --append FORWARD --in-interface eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 'dhcp-range=,,12h' > /etc/dnsmasq.conf
ifconfig eth0 up
pkill dnsmasq

God i feel stupid lol... this was a post i made months ago... i try to post my working examples here for this reason...

The above should do the job with a small modification... wlan0 is the out device. At0 can be changed to eth0 for in device...

Edited by i8igmac
Link to comment
Share on other sites

  • 3 weeks later...

Im going to bring this thread back as i now have another problem...

i want 2 devices to work with dnsmasq to provide dhcp service's

I currently have my raspberry pi associated with a access point using wlan0... i then have a alfa-r36 wireless router plugged into the pi's eth0 port to act as a hotspot... The script above makes this a working repeater setup (i get awesome speeds with both IN and OUT devices using wireless N) The alfa-r36 is getting serviced dhcp request from the pi...

But now i would like to plug into the pi another alfa card for playing around... My first test is as follows

airbase-ng wlan2 -P -C 60 -c 4

(created a new tap device at0.. karma like access point)

ifconfig at0 up

iptables --append FORWARD --in-interface at0 -j ACCEPT

So. at this point my new access point wont provide ip address's to my clients...

iptables is a bit confusing and maybe this is the problem?

EDIT.. i have fixed it... the iptables worked above but with a small adjustment to dnsmasq.conf


Edited by i8igmac
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...