title: Remote access to Huawei E3372 WebInterface on headless RaspberryPi
body: <p>I'm trying to (remotely) connect to the E3372's (Huawei LTE stick) WebInterface...</p>
  
  <p>The E3372 is recognised by my RaspberryPi as "12d1:14dc Huawei Technologies Co., Ltd." - so it seems to be in HiLink-mode. Good.</p>
  
  <p>using </p>
  
  <pre><code>&gt; ifconfig
  </code></pre>
  
  <p>I see that the stick uses eth1 / 192.126.8.100
  and the WebInterface's web-server is supposed to run on 192.168.8.1...</p>
  
  <p>To verify this, on the Pi (from PC using ssh to eth0 with a DHCP-assigned IP-address of 192.168.10.123) I can e.g. query (read) the starting-page of the E3372's WebInterface using:</p>
  
  <pre><code>&gt; curl 192.168.8.1/html/home.html
  </code></pre>
  
  <p>...so obviously the web-server is up-and-running!</p>
  
  <p>Now I try to forward connections on eth0's port=80 (192.168.10.123:80) to 192.168.8.1:80, so I can then access the WebInterface from an external PC connected to the Pi's eth0; so I:</p>
  
  <p>1) enable ip4-port-forwarding:</p>
  
  <pre><code>&gt; sudo nano /proc/sys/net/ipv4/ip_forward
  </code></pre>
  
  <p>--> and change the '0' to '1'</p>
  
  <p>2) use iptables to set the appropriate forwarding:</p>
  
  <pre><code>&gt; sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to 192.168.8.1:80
  &gt; sudo iptables -A FORWARD -p tcp -d 192.168.8.1 --dport 80 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
  </code></pre>
  
  <p>Now using a browser on the PC with the URL "<a href="http://192.168.10.123" rel="nofollow noreferrer">http://192.168.10.123</a>" yields (after some seconds): "This site can’t be reached"...</p>
  
  <p>please help! what's wrong here???</p>
  
  <p>Thanks for helping!</p>