Jump to content

Recommended Posts

Posted

Hi I trying to create an Access Point from NanoPi M1 plus device having Ubuntu_bionic_next_4.14.78.7z OS.

I am able to create the AP and my devices are able to connect to it. But somehow they are not able to use the internet.

 

I have eth0 interface as plugged in to the board which whose IP will be forwarded. via wlan0 interface.

 

I have already set net.ipv4.ip_forward=1 in /etc/sysctl.conf and /proc/sys/net/ipv4/ip_forward to 1.

 

I issued the following iptables commands, but it didn't work...

 

sudo iptables -F
sudo iptables -t nat -F
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT

 

 

ifconfig

 

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.55.247  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::81:14ff:fea2:1b15  prefixlen 64  scopeid 0x20<link>
        ether 02:81:14:a2:1b:15  txqueuelen 1000  (Ethernet)
        RX packets 599  bytes 40641 (40.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 59  bytes 9337 (9.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 39

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 571  bytes 41372 (41.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 571  bytes 41372 (41.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.24.1.1  netmask 255.255.255.0  broadcast 172.24.1.255
        ether b0:f1:ec:2c:dd:0c  txqueuelen 1000  (Ethernet)
        RX packets 32  bytes 2796 (2.7 KB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 18  bytes 2316 (2.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

ip addr

 

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:81:14:a2:1b:15 brd ff:ff:ff:ff:ff:ff
    inet 192.168.55.247/24 brd 192.168.55.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::81:14ff:fea2:1b15/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether b0:f1:ec:2c:dd:0c brd ff:ff:ff:ff:ff:ff
    inet 172.24.1.1/24 brd 172.24.1.255 scope global wlan0
       valid_lft forever preferred_lft forever
 

I dont know, where I am wrong?

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines