momoz
Posts: 11
Joined: Tue Jan 12, 2016 9:19 am

Turn the Raspberry Pi B+ into a WiFi router using an LTE mod

Thu Feb 11, 2016 8:03 am

Hello,

I'd like to Turn the Raspberry Pi B+ into a WiFi router using an LTE modem (4G).

To do so, I follow the instruction exist in this website http://raspberrypihq.com/how-to-turn-a- ... fi-router/

Except these instruction is used to turn the Raspberry into a WiFi router using an ethernet but not the 4G modem.

so I tried to modify some point to adapt to the 4G modem. so I do these modification:

1/ sudo nano /etc/network/interfaces (I do the same thing as the website required except I add
iface wwan0 inet dhcp

2/ and to setting up the actual translation between the ethernet port called eth0 and the wireless card called wlan0 :
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

for my case I changed eth0 by wwan0 to obtain:

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

3/To starting the wireless router I do
sudo service isc-dhcp-server start
sudo service hostapd start

4/When I turn on the wifi of my mobile or my laptop, I found the SSID that I create on hostapd.conf and I can logg in with the password

But the problem I can't access to internet!!!

Is there any thing wrong that I do in the steps that I modified??

Thank you for your help

Best regards

fredoll
Posts: 228
Joined: Thu Jan 10, 2013 10:30 am

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

Thu Feb 11, 2016 8:49 am

ip_forward setting ?
sudo sysctl -w net.ipv4.ip_forward=1

momoz
Posts: 11
Joined: Tue Jan 12, 2016 9:19 am

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

Thu Feb 11, 2016 2:44 pm

Hello,

the ip forward is done as mentionned in the website:

Open /etc/sysctl.conf with:

sudo nano /etc/sysctl.conf

Scroll down to the last line of the file and add the line:

net.ipv4.ip_forward=1

Next start the translation right away by running:

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

ondrej
Posts: 34
Joined: Fri Jul 31, 2015 11:14 am

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

Thu Feb 11, 2016 6:26 pm

provide ifconfig, ip r and iptables-save outputs

momoz
Posts: 11
Joined: Tue Jan 12, 2016 9:19 am

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

Mon Feb 15, 2016 9:39 pm

Hello Ondrej,

Thank you for your response.

The last couple of days I was trying to understand how to combine the ip route and the ip tables. I do some research on net but just I'm scrambled.

Could you please give me some details about how shall I do??

Thank you

ondrej
Posts: 34
Joined: Fri Jul 31, 2015 11:14 am

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

Wed Feb 17, 2016 10:22 am

hi momoz,

i already sent you request for print out of ifconfig, ip r and iptables-save commands to help you. for more i advise you to study IP routing and IP tables ;)

momoz
Posts: 11
Joined: Tue Jan 12, 2016 9:19 am

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

Wed Feb 17, 2016 9:48 pm

Hello ondrej,

Thank you for your response.

Just I apologize because I don't receive a notification tell me that you have sent a request for print out of ifconfig. (I don't received yet)


User avatar
DougieLawson
Posts: 37088
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE mod

Tue Jul 25, 2017 10:08 pm

Try this: https://www.raspberrypi.org/documentati ... s-point.md which is known to work as long as your WiFi dongle supports AP mode.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

madrian
Posts: 29
Joined: Tue Aug 28, 2012 6:48 pm

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE mod

Tue Jul 25, 2017 11:07 pm

Unfortunately there is no new information on that page.

I want to share internet from a 4G LTE modem, If I change commands from wwan0 to WiFi wlan0, then it's working. Interesting, I don't understand why it's not working with the LTE modem wwan0 interface. :evil:


Return to “Networking and servers”