1

How can I access my Raspberry PI 3 (Apache/Nextcloud) from a ZTE MF831 data stick? I use Raspbian Strecth and got a public/static IP from my provider.

EDIT: The data stick is connected directly to the Pi.

EDIT: (screenshot added)

enter image description here

  • 1
    This community might be devoid of others using the Nextcloud or ZTE MF831, but it looks to be a standard 4G LTE modem that enumerates via cdc_ether. Does it appear as expected with lsusb and come up with the correct IP when you run ifconfig -a? Assuming you're running Apache on the standard port 80, what happens when you try to access http://<your static IP> from another machine? – jdonald Jan 1 '18 at 22:41
  • lsusb lists the ZTE stick as Bus 001 Device 007: ID 19d2:1405 ZTE WCDMA Technologies MSM. ifconfig -a inet says inet 192.168.0.182 for usb01. The ZTE stick is in USB-Ethernet mode. When entering 192.168.0.1 in the Firefox address bar, a web interface is available. My static IP doesn't work (request timeout). – Lunar Sea Jan 2 '18 at 17:31
0
+100

It appears the ZTE MF831 acts much like a router+modem, assigning your Pi the LAN address of 192.168.0.182 in one instance.

I'm assuming that your 4G connection is working in at least one direction. That is, with the stick your Pi can currently access outside web pages even with no ethernet connection and WiFi disabled. The next step is to get it working in the other direction.

From webGUI (http://192.168.0.1), a first straightforward troubleshooting step could be to put your Pi in the DMZ, like in this screenshot: MF831 webGUI DMZ screenshot from the web

(Use 192.168.0.182 or whatever your cdc_ether (USB) IP address comes out to.)

Note that this will expose all ports to the outside web, so if you happen to have activated SSH be sure to change your default password to something other than raspberry.

Once configured, try accessing your Apache server on the static IP from outside. Just in case selective ports are blocked or the webGUI server conflicts on port 80, you can also troubleshoot with other ports. For example you could enable SSH (sudo systemctl start ssh) and try to ssh from outside, or test Apache on a different port.

After the simple DMZ approach has been verified, you should turn it off and go for the Port Forwarding tab to forward only selective traffic rather than the less secure DMZ forwarding all traffic. Forward port 80 for HTTP, port 443 for HTTPS if Nextcloud if it supports that. This may have been what @Deepesh was trying to say, just he mentioned the wrong port.

Edit (to summarize as far as we got to in the discussion comments): Although the screenshot shows there exists a full-featured firmware for MF831 from 2016 or newer, some providers use older firmware or have removed features from webGUI. If so, it still might be possible to access hidden options via explicit curl commands. For setting the DMZ:

curl -s 'http://192.168.0.1/goform/goform_set_cmd_process' -H 'Host: 192.168.0.1' -H 'Referer: http://192.168.0.1/index.html' --compressed --data 'goformId=DMZ_SETTING&DMZEnabled=1&DMZIPAddress=192.168.0.18‌​2'

where in place of 192.168.0.182 put your local IP address as revealed by ifconfig. If successful, the command should print out:

{"result": "success"}

It may then be necessary to reset the USB modem before testing the DMZ.

  • I've checked the web GUI and there are no tabs for 'DMZ' and 'Port Forwarding' (see added screenshot). The stick comes from an Austrian discounter. – Lunar Sea Jan 2 '18 at 20:29
  • It seems that DMZ can be set using curl (see #98): lteforum.at/mobilfunk/zte-mf831.3783/seite-10.html#post-81906 – Lunar Sea Jan 2 '18 at 20:42
  • The approach on that thread looks like it requires installing OpenWRT, which might work but is quite a project. But it would be odd if ZTE removed existing basic functionality on later versions of this device. I've read that "CDC-Mode is for end users connecting their PCs. Serial mode is for Routers, that will handle firewalling, NAT, Port forwarding, IPv6 for more efficiently then the modem firmware. That's quoted for OpenWRT but maybe there's an equivalent in the existing software. Can you switch your device out of "USB-Ethernet mode" into an alternative mode with more options? – jdonald Jan 2 '18 at 20:57
  • Software Version is WEB_HOFAUTMF831V1.0.0B02,Firmware Version is BD_HOFATMF831V1.0.0B03 and Hardware Version is MF831-1.0.0.The software upgrade seems not to work (nothing happens). Switching the stick to serial mode should be possible: rbit.at/wordpress/modem-router/… (I've not tested serial mode because I don't know how to set APN and port forwarding. One of the comments says that download speed in serial mode is not as fast as in ethernet mode. Port forwarding in ethernet mode should also be possible but there are no instructions.) – Lunar Sea Jan 2 '18 at 21:30
  • I think my suggestion of serial mode may be unproductive if it requires flashing OpenWRT. I'm a bit confused on your first link as to whether those URLs are for a new OpenWRT installation or the existing MF831 firmware to prepare for flashing. What happens when you run curl -s 'http://192.168.0.1/goform/goform_set_cmd_process' -H 'Host: 192.168.0.1' -H 'Referer: http://192.168.0.1/index.html' --compressed --data 'goformId=DMZ_SETTING&DMZEnabled=1&DMZIPAddress=192.168.0.182' (check your IP address is still 192.168.0182 before running). Do you get {"result": "success"} or "not found"? – jdonald Jan 2 '18 at 22:53
0

For that you'll need to setup port forwarding in your router... Go to your pi's terminal and type route -ne and copy the first entry (usually 192.168.something.something) paste it in your browser and you'll go to your router settings, the credentials are different for different routers so you'll have to google for the default username and password. Once you're in you'll get into a web UI, navigate to port forwarding settings and once you're there you need to set up port forwarding for port 22 and enter your pi's IP (static ip), then save the settings. after that go to a browser in your pi and type "what's my IP " in google....

While logging in using ssh type the ip you got from google and port 22. and you're done

  • Unfortunately, I missed to mention that the data stick is connected directly to the Pi. – Lunar Sea Dec 28 '17 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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