Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2] 3 4 ... 7

Author Topic: HG612 - Access GUI Over WAN  (Read 21701 times)

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: HG612 - Access GUI Over WAN
« Reply #15 on: April 23, 2016, 12:59:39 PM »

That's 'sh' by the way, not 'SH'.
Logged
  Eric

Dray

  • Kitizen
  • ****
  • Posts: 2361
Re: HG612 - Access GUI Over WAN
« Reply #16 on: April 23, 2016, 01:10:04 PM »

SH works for me ;)
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: HG612 - Access GUI Over WAN
« Reply #17 on: April 23, 2016, 01:27:49 PM »

You're right, sorry. :)
Logged
  Eric

SignedAdam

  • Member
  • **
  • Posts: 58
Re: HG612 - Access GUI Over WAN
« Reply #18 on: April 23, 2016, 02:13:59 PM »

there's no command line in DSLstats v5.8, also, when I open the command line in windows 10 Pro, and use the command "telnet 192.168.1.1" it says 'telnet' is not recognized as an internal or external command, operable program or batch file. Huh?
Logged
I'm a geek on his own

Dray

  • Kitizen
  • ****
  • Posts: 2361
Re: HG612 - Access GUI Over WAN
« Reply #19 on: April 23, 2016, 02:18:09 PM »

You have to enable telnet as its disabled by default http://www.technipages.com/windows-10-enable-telnet
Logged

SignedAdam

  • Member
  • **
  • Posts: 58
Re: HG612 - Access GUI Over WAN
« Reply #20 on: April 23, 2016, 02:28:52 PM »

Thank you Dray, feel like an id!ot now, should of known it was a hidden windows feature,

Code: [Select]
Welcome Visiting Huawei  Home Gateway
Copyright by Huawei Technologies Co., Ltd.
Login:admin
Password:
ATP>sh


BusyBox v1.9.1 (2014-01-21 16:44:38 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# ifconfig
br0       Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          inet addr:192.168.1.253  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:150370 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67350 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:14557574 (13.8 MiB)  TX bytes:12464698 (11.8 MiB)

br1       Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:809 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:35842 (35.0 KiB)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5637982 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9925837 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:575739427 (549.0 MiB)  TX bytes:307266516 (293.0 MiB)
          Interrupt:40 Base address:0x6a00

eth0.4    Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:150581 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67347 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17297316 (16.4 MiB)  TX bytes:12745378 (12.1 MiB)


eth0.5    Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5487401 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9858490 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:558442111 (532.5 MiB)  TX bytes:294521138 (280.8 MiB)


imq0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
-00
          UP RUNNING NOARP  MTU:16000  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:11000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

imq1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
-00
          UP RUNNING NOARP  MTU:16000  Metric:1
          RX packets:5487310 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5487310 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:11000
          RX bytes:558431520 (532.5 MiB)  TX bytes:558431520 (532.5 MiB)

imq2      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
-00
          UP RUNNING NOARP  MTU:16000  Metric:1
          RX packets:5487310 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5485538 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:11000
          RX bytes:558431520 (532.5 MiB)  TX bytes:557376180 (531.5 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:118657 errors:0 dropped:0 overruns:0 frame:0
          TX packets:118657 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7238981 (6.9 MiB)  TX bytes:7238981 (6.9 MiB)

pktcmf_sa Link encap:UNSPEC  HWaddr FE-FF-FF-FF-FF-FF-FF-FF-00-00-00-00-00-00-00
-00
          UP NOTRAILERS RUNNING NOARP  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:50 Base address:0x5220

pktcmf_sw Link encap:UNSPEC  HWaddr FE-FF-FF-FF-FF-FF-FF-FF-00-00-00-00-00-00-00
-00
          UP NOTRAILERS RUNNING NOARP  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:42 Base address:0x6a40

ptm1      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9858491 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5485490 errors:0 dropped:48 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4294967295 (3.9 GiB)  TX bytes:556315364 (530.5 MiB)

ptm1.101  Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9858490 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5487310 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:156415612 (149.1 MiB)  TX bytes:558431520 (532.5 MiB)

* Note : all mac address's have been replaced with XX:XX:XX:XX:XX:XX
« Last Edit: April 23, 2016, 04:59:08 PM by burakkucat »
Logged
I'm a geek on his own

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: HG612 - Access GUI Over WAN
« Reply #21 on: April 23, 2016, 02:57:45 PM »

thanks, it looks the same as my hg612 not connected to wan so am surprised by that.

going to try and get a 2nd subnet up on my hg612 and if I am successful will post back.
Logged

SignedAdam

  • Member
  • **
  • Posts: 58
Re: HG612 - Access GUI Over WAN
« Reply #22 on: April 23, 2016, 08:37:31 PM »

Guessing you were unsuccessful
Logged
I'm a geek on his own

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: HG612 - Access GUI Over WAN
« Reply #23 on: April 24, 2016, 04:06:13 AM »

no I just havent looked much yet, I had to do something else and also went out again.
Logged

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: HG612 - Access GUI Over WAN
« Reply #24 on: April 24, 2016, 06:18:03 AM »

yeah it seems quite simple to do, the problem is I am not prepared to connect my hg612 as my modem, so as a result I wont be testing this whilst wan is activated, but right now i do have lan access to the hg612 using lan1 on the 2nd subnet.
Logged

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: HG612 - Access GUI Over WAN
« Reply #25 on: April 24, 2016, 06:41:04 AM »

hg612 shared wan/lan cable guide

1 - login to telnet on the hg612 and run the following command, adjust for your own preference, my example is using the 192.168.3.x subnet, this is something that you will have to do on every reboot of the device.

ifconfig br1 192.168.3.1 netmask 255.255.255.0

2 - on your router run the folliowing commands, again adjust as required.  This command is for iptables 1.4+
Also the correct ethernet device needs to be chosen.  The correct ethernet device depends on the router model and type of internet connection.
On my asus router using sky dhcp the ethernet device on the wan port is eth0, the correct device should be identifiable by having the internet ip assigned to it. check with ifconfig.

ifconfig eth0:1 192.168.3.253 netmask 255.255.255.0
iptables -t nat -I POSTROUTING ! -s $(nvram get lan_ipaddr) -d 192.168.3.0/24 -j SNAT --to 192.168.3.253

At this point the hg612 is not pingable because the firewall is blocking the traffic.
The easy way to fix this is login to the GUI, click on advanced, then firewall, change firewall level to disabled and then click submit.  This change will survive reboots.
A more proper way to fix is do this edit the ip filtering on the hg612. But I see no way in the GUI to do this. It seems to be a read only screen.

After disabling the firewall the hg612 should be pingable from the router and pc.

Below is output of my testing, I tested over one of my router's lan ports, so these commands are adjusted.

Basically lan2 from my hg612 is connected to my laptop which itself is not connected to rest of my lan.
Lan1 is connected to my router in one of the lan ports.

Can see here, br0 has my lan ip bound to it.

br0        Link encap:Ethernet  HWaddr 08:62:66:96:AF:E0 
           inet addr:192.168.1.253  Bcast:192.168.1.255  Mask:255.255.255.0

I add a 192.168.3.x ip to the br0 interface as so.

admin@RT-AC68U:/jffs/scripts# ifconfig br0:1 192.168.3.253 netmask 255.255.255.0

Can check as so.

admin@RT-AC68U:/jffs/scripts# ifconfig br0:1
br0:1      Link encap:Ethernet  HWaddr 08:62:66:96:AF:E0 
           inet addr:192.168.3.253  Bcast:192.168.3.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

Here is the iptables command

admin@RT-AC68U:/jffs/scripts# iptables -t nat -I POSTROUTING ! -s $(nvram get lan_ipaddr) -d 192.168.3.0/24 -j SNAT --to 192.168.3.253
admin@RT-AC68U:/jffs/scripts#

ping from router

admin@RT-AC68U:/jffs/scripts# ping 192.168.3.1
PING 192.168.3.1 (192.168.3.1): 56 data bytes
64 bytes from 192.168.3.1: seq=0 ttl=64 time=2.087 ms
64 bytes from 192.168.3.1: seq=1 ttl=64 time=0.445 ms
64 bytes from 192.168.3.1: seq=2 ttl=64 time=0.406 ms
64 bytes from 192.168.3.1: seq=3 ttl=64 time=0.414 ms
64 bytes from 192.168.3.1: seq=4 ttl=64 time=0.416 ms

ping from pc

C:\Windows\system32>ping 192.168.3.1

Pinging 192.168.3.1 with 32 bytes of data:
Reply from 192.168.3.1: bytes=32 time<1ms TTL=63
Reply from 192.168.3.1: bytes=32 time<1ms TTL=63
Reply from 192.168.3.1: bytes=32 time<1ms TTL=63
Reply from 192.168.3.1: bytes=32 time<1ms TTL=63

Ping statistics for 192.168.3.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

I can telnet from the pc no problem.

Hope this helps.
« Last Edit: April 24, 2016, 11:33:59 AM by Chrysalis »
Logged

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: HG612 - Access GUI Over WAN
« Reply #26 on: April 24, 2016, 07:06:44 AM »

ok this is how to get it working without disabling the firewall

On the hg612 run the following commands, changes lost on reboot.

iptables -I INPUT_SERVICE_ACL -i br1 -s 192.168.3.253 -p ICMP -j ACCEPT
iptables -I INPUT_SERVICE_ACL -i br1 -s 192.168.3.253 -p TCP --dport 80 -j ACCEPT
iptables -I INPUT_SERVICE_ACL -i br1 -s 192.168.3.253 -p TCP --dport 23 -j ACCEPT
iptables -t nat -I PRE_SERVICE_ACL -i br1 -s 192.168.3.253 -p ICMP -j ACCEPT
iptables -t nat -I PRE_SERVICE_ACL -i br1 -s 192.168.3.253 -p TCP --dport 80 -j ACCEPT
iptables -t nat -I PRE_SERVICE_ACL -i br1 -s 192.168.3.253 -p TCP --dport 23 -j ACCEPT
Logged

SignedAdam

  • Member
  • **
  • Posts: 58
Re: HG612 - Access GUI Over WAN
« Reply #27 on: April 24, 2016, 10:22:25 AM »

You are a Genius, but is there anyway, to do all this in the Gui, its easyer for noobs, and people like me who prefer the Gui/ user interface and not a command line

This is not an arguement, the command prompt is faster, fact! but the user interface is friendly, fact! noobs need this, thank you for all your hard work so far, I've put alot of hours in to following what people say, and i will give this a go

* is there anyway to make this permanent
* lots of power cuts where i live, leave and forget is the best answer to everything
« Last Edit: April 24, 2016, 10:28:12 AM by SignedAdam »
Logged
I'm a geek on his own

Dray

  • Kitizen
  • ****
  • Posts: 2361
Re: HG612 - Access GUI Over WAN
« Reply #28 on: April 24, 2016, 10:24:18 AM »

After you make the changes using the CLI, can you see them reflected in the GUI?
Logged

SignedAdam

  • Member
  • **
  • Posts: 58
Re: HG612 - Access GUI Over WAN
« Reply #29 on: April 24, 2016, 10:41:26 AM »

I know, you can download the configuration file, which has hundreds of settings in, you can open it with a text editer, and change the settings by changing the text, when you upload it to the HG612 the settings you changed in text editer, take effect, i think this would be a better way and the setting stick, meaning even on a reboot, they are not lost,

* if someone knows what text needs to be edited in the configuration file, it would be job done

« Last Edit: April 24, 2016, 10:44:19 AM by SignedAdam »
Logged
I'm a geek on his own
Pages: 1 [2] 3 4 ... 7
 

anything