View Single Post
Jeg prøver å sette opp pcèn min som en ruter. Jeg får laget "FalskAP" men når noen prøver å koble til får de ikke utsendt IP adresser.
Jeg har brukt fire dager og lest meg ihel på nettett og prøvd forskjellige guider, jeg legger ved her all dokumentasjon jeg har og håper det er noen som kunne sett gjennom kodene og forklart meg hva jeg gjør feil. Setter pris på alle innspill. Jeg kjører Kali Linux.

$ ifconfig

#My internet is coming from wlan1 "inet addr:192.168.0.104 Bcast:192.168.0.255 Mask:255.255.255.0"

$ airmon-ng start wlan0
$ airbase-ng --essid "FakeAP" mon0

######This far everything is OK, I can se the "FakeAP" from other computers. But I need to asign IP`s.

#Verfiy details of logical access point interface
$ ifconfig at0

at0 Link encap:Ethernet HWaddr 10:08:b1:1e:be:b7
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


#Create a bridge interface (To chek Iw briged at0 to wlan1 (internett) and wlan0 (mon0))
$ brctl addbr myBridge

#Now, associate real interfaces (wlan1 and at0) to bridge interfaces
#I needed to run this command to make it work: $ iw dev wlan1 set 4addr on
$ brctl addif myBridge wlan1
$ brctl addif myBridge at0

#Verfiy details of new bridge interface
$ brctl show

#bridge name bridge id STP enabled interfaces
#myBridge 8000.1008b11ebeb7 no at0
wlan1
######Looks like wlan1 (internett) and at ("FakeAP"?) are connected.

#Remove the IP address of wlan1 and at0 interfaces
$ ifconfig wlan1 0.0.0.0 up
$ ifconfig at0 0.0.0.0 up

#Assign IP address to bridge interface we have created earlier. You can use your old wlan0 IP address or assign any IP free address on your network
$ ifconfig myBridge 192.168.0.104/8 up

$ ifconfig myBridge
myBridge Link encap:Ethernet HWaddr 10:08:b1:1e:be:b7
inet addr:192.168.0.104 Bcast:192.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::1208:b1ff:fe1e:beb7/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)

######It looks like my bride has an assigned IP. The One From wlan1

#Enable IP forwarding on your computer. In other word, your computer will work as a router. IT will perform NATing.
$ echo 1 > /proc/sys/net/ipv4/ip_forward

######Try to restart "FakeAP"

$ airbase-ng --essid "FakeAP" mon0
16:06:20 Created tap interface at0
16:06:20 Trying to set MTU on at0 to 1500
16:06:20 Access Point with BSSID 10:08:B1:1E:BE:B7 started.
Error: Got channel -1, expected a value > 0.
16:06:26 Client 00:E3:B2:C2:3B:F0 associated (unencrypted) to ESSID: "FakeAP"
16:06:26 Client 00:E3:B2:C2:3B:F0 associated (unencrypted) to ESSID: "FakeAP"
16:06:26 Client 00:E3:B2:C2:3B:F0 associated (unencrypted) to ESSID: "FakeAP"

######And the latest lines just repeats itselves, and the computer trying to connect with dont get an IP. WHat am I doing wrong.


Below is an easy guide with dnsmasq, but i dont get it to work:

/etc/dnsmasq.config
change line 90 and 141 from-to:
#interface= - interface=at0
on line 141 just remove the "#"

airmon-ng start wlan1
airbase-ng --essid FAKE mon0
ifconfig at0 192.168.0.150 up
dnsmasq
echo 1 > /proc/sys/net/ipv4/ip_forward



EXPERIMENT:
airmon-ng start wlan1
airbase-ng --essid FAKE mon0
ifconfig at0 192.168.0.150 up
dnsmasq
brctl addbr myBridge brctl stp br0 on
iw dev wlan0 set 4addr on
brctl addif myBridge wlan0
brctl addif myBridge at0
ifconfig wlan0 0.0.0.0 up
ifconfig at0 0.0.0.0 up
ifconfig myBridge 192.168.0.104/8 up
echo 1 > /proc/sys/net/ipv4/ip_forward