Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a laptop running hostapd, phpd, and mysql. This laptop uses an Ethernet connection to connect to the internet and acts as a wireless access point for my workplace's wifi devices. After installing some software and reconnecting my Ethernet elsewhere, my "em1" device is no longer present and wirelessly connected devices can no longer reach the internet.

The software I recently installed is: pptp, pptpd, and updated some fedora libraries. I have also recently moved my desk and laptop to another location and thus had to reconnect the Ethernet elsewhere.

Wifi devices no longer have access to the internet. Wirelessly connected devices are able to successfully log into the laptop, showing full strength, correct SSID, and uses the proper password. However, when I tried to connect to a site like google, the request times out.

The device "em1" also no longer appears on my machine. Running: # ifup em1 will give me the following output: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device em1 does not seem to be present, delaying initialization. And running: # dhclient em1 has the following output: Cannot find device "em1"

When I run # dmesg|grep renamed, I get the following: renamed network interface eth0 to p4p1. I've tried to connect to the internet through p4p1 and was successful. However, my wireless devices connected to my laptop are no longer able to connect to the internet.

I have uninstalled pptp and pptpd using # yum erase ... but the problem still persists.

To install pptp I used: # yum install pptp

To install pptpd I did the following:

# rpm -Uvh http://poptop.sourceforge.net/yum/stable/fc15/pptp-release-current.noarch.rpm
# yum install pptpd

To update my fedora libraries I used:

# yum check-update
# yum update

EDIT:

Running # route produces the following results:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.11.200.1     0.0.0.0         UG    0      0        0 p4p1
10.11.200.0     *               255.255.252.0   U     0      0        0 p4p1
172.16.100.0    *               255.255.255.0   U     0      0        0 wlan0
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I opted to solve this issue by starting from scratch.

I installed Fedora 17, hostapd, dnsmasq, iptables, and community drivers.

  • The drivers I used were compatible with my hardware and the instructions for installing them are here: http://linuxwireless.org/en/users/Drivers/b43.
  • dnsmasq was used to host a dhcp server which will assign IPs to connected devices.
  • iptables was used to enable NAT forwarding through my ethernet interface.
  • hostapd was used to manage the wifi connection and security.

The following is a script I made to start a working access point:

#!/bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward

# Clear iptables Rules
iptables -F
iptables -t nat -F

# iptables Rules
iptables -A FORWARD -d 192.168.1.0/24 -o wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -s 192.168.1.0/24 -i wlan0 -j ACCEPT
iptables -t nat -A POSTROUTING -o p4p1 -j MASQUERADE

# Set wlan0 IP
ip addr add 192.168.1.1/24 broadcast 192.168.1.255 dev wlan0
ip link set wlan0 up

# Set DHCP
dnsmasq -C /dev/null >/dev/null 2>&1 --listen-address=192.168.1.1 --dhcp-range=192.168.1.2,192.168.1.200,12h

# hostapd
hostapd /etc/hostapd/hostapd.conf

The content of hostapd.conf is the following:

ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_passphrase=testomesto
driver=nl80211
interface=wlan0
hw_mode=g
channel=1
ssid=osumi-0
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.