Kitz Forum

Broadband Related => Broadband Hardware => Topic started by: zvirus on May 06, 2020, 05:51:06 PM

Title: Access Zyxel Behind Netgear AP
Post by: zvirus on May 06, 2020, 05:51:06 PM
Hi,

 Did plenty of research but no joy...

 Cant access my Fancy new router set as Modem/BRIDGE. Cant get stats over telnet.

 Its Zyxel VMG8924-B10A (AAKL.28)

 I have followed this one:
 https://kitz.co.uk/routers/zyxel_VMG8324-B10A_bridge.htm#linestats

 and then tried something else https://forum.kitz.co.uk/index.php/topic,21825.0.html   - still no success... :(

Does not over WAN, Does not work on 2 lan cables too

 My routing table on R7000:
..
Destination   Gateway   Genmask   Flags   Metric   Ref   Use   Iface
92.20.160.1   *   255.255.255.255   UH   0   0   0   WAN
192.168.2.0   *   255.255.255.0          U   0   0   0   LAN
192.168.1.0   *   255.255.255.0         U   0   0   0   WAN
92.20.160.0   *   255.255.224.0         U   0   0   0   WAN
default         92.20.160.1   0.0.0.0       UG   0   0   0   WAN

Routing on Zyxel:
(https://tombassist.uk/pliki/2020-05-06%2019_03_38-Microsoft%20Edge.png)

R7000 ip: 192.168.2.1
Zyxel ip: 192.168.1.1

In the past it worked with ALL routers I  had HG612 3b, D-link 3872

I managed to get them to  work via WAN - did not use 2 LAN cables with HG612

On top of it, when connected to my PC to get an access to Zyxel I can login and do whatever I like but... telnet does not work  :o SORTED

HELP  :baby:

Thank You in advance

Tomas
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 06, 2020, 11:13:03 PM
Ok. Got it...

First thing on Zyxel:

(https://tombassist.uk/pliki/bbridge.png)

Second: I set the R7000 xwrt  ip to: 192.168.1.254 - making sure DHCP will end at .253 not .254(!)


Made some start scrips on my R7000 xwrt  including two commands:

Code: [Select]
ifconfig eth0:1 192.168.2.253 netmask 255.255.255.0

and:

Code: [Select]
iptables -t nat -I POSTROUTING ! -s $(nvram get lan_ipaddr) -d 192.168.2.0/24 -j SNAT --to 192.168.2.253
So I do not have to run them after reboot/s

And now I can access Zyxel WITHOUT 2 cables over WAN.... by typing 192.168.2.254

and R7000 by typing 192.168.1.254


Cheers!

Title: Re: Access Zyxel Behind Netgear AP
Post by: burakkucat on May 06, 2020, 11:56:15 PM
. . . now I can access Zyxel WITHOUT 2 cables over WAN.... by typing 192.168.2.254

and R7000 by typing 192.168.1.254

That's good to know. Thank you for posting your solution.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 07:31:43 AM
Hi,

 My pleasure! You guys are so helpful here - its my duty to share my little knowledge ;)

So, If you owe Asus AP(might work for other decent routers) connected to a modem you can use these scripts placed in: /jffs/scripts/

wan-event

Code: [Select]
#!/bin/sh
ifconfig eth0:1 192.168.2.253 netmask 255.255.255.0

nat-start

Code: [Select]
#!/bin/sh
iptables -t nat -I POSTROUTING ! -s $(nvram get lan_ipaddr) -d 192.168.2.0/24 -j SNAT --to 192.168.2.253

Make sure their ownership is: 0755, and make sure to: Enable JFFS custom scripts and configs in your router


And in my case (unfortunately I must use MS Windows due to Music Editing and production) you MUST run this command:

Code: [Select]
dos2unix /jffs/scripts/*
Otherwise ALL scripts placed in catalog /scripts/ WONT work - I guarantee You. Unless Your Windows text editor is set to EOL > Unix/OSX

I use Win SCP software to edit/add files in my Access Point.


Cheers!
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 09:38:05 AM
On asus router you don't need scripts, I configured zyxel VMG1312-B10A with one cable and was working perfectly fine.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 09:50:42 AM
Yes, You do not need scrips but routes wont be "remembered" after restart - hence you have tu run commands manually....

without these commands I could not connect with my zyxel and trust me - I spent hours on this "issue" :)
My 1st approach was - do not use any extra routing(executed commands adding new routes) - It did not work...

My Zyxel`s default IP is: 192.168.1.1
My R7000 ip is: 192.168.1.254

and guess what? I cant connect with 192.168.1.1 no matter what. Im rather green regarding network...
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 10:36:50 AM
I only mention asus router, therefore not sure how it will looks like on others.
https://forum.kitz.co.uk/index.php/topic,24210.msg410739.html#msg410739 (https://forum.kitz.co.uk/index.php/topic,24210.msg410739.html#msg410739)
And you can reboot asus as much as you like, always will work.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 11:22:29 AM
I only mention asus router, therefore not sure how it will looks like on others.
https://forum.kitz.co.uk/index.php/topic,24210.msg410739.html#msg410739 (https://forum.kitz.co.uk/index.php/topic,24210.msg410739.html#msg410739)
And you can reboot asus as much as you like, always will work.

Quote
Firstly, ensure the Draytek 130 Modem is on a different subnet to that of the ASUS router.
E.g
Draytek Vigor 130 – 192.168.2.1 (default)
ASUS Router – 192.168.1.1 (default)

(you can use whatever subnets you wish, just substitute your IP values to suit)

Then on the ASUS Router, go to Advance Settings > LAN > LAN IP and ensure IP address is 192.168.1.1
Then go to Advanced Settings > WAN >  Internet Settings and Select – Get the Wan IP Address Automatically, and select the No radial button, and manually enter ……

IP Address – 192.168.2.2 (Draytek Modems Spare IP Address)
Subnet – 255.255.255.0 (Draytek Modems Subnet Address)
Default Gateway 192.168.2.1 (Draytek Modem actual IP Address)

Note, WAN DNS may need to be added, I used Google’s
8.8.8.8 and 8.8.4.4

Now you should be able to telnet to the Draytek Modem via 192.168.2.1 and via browser, Draytek Modem UI via http://192.168.2.1

I had this configuration set on my routers as mentioned in this link provided above:
R7000 ip: 192.168.2.1
Zyxel ip: 192.168.1.1

And it did not work...



Mine R7000 is powered by xwrt vortex = same as any ASUS with Melin Firmware:
(https://i.imgur.com/9XJ96OBl.png)



This is not for a modem in Bridge mode (I guess) If I do it with modem set as bridge IT DOES NOT WORK - I can connect with the modem but DONT have internet access...

In other words - yes it works without magic commands but not if modem/router is set as BRIDGE. I think  ::)

I want Firewall and all good stuff to be done by PROPER router in my case R7000 so bridge mode on Zyxel is the Best option.... people say.
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 11:35:25 AM
Yes, this instruction is for modem set in bridge mode. I personally have modem setup in bridge, and either vigor2760 or zyxel VMG1312-B10A working that way, on booth stock and Merlin fw. No issues at all. Only difference is that I don't have any vlan setup as for standard UK connection vlan id 101 is set in modem.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 11:39:23 AM
Yes, this instruction is for modem set in bridge mode. I personally have modem setup in bridge, and either vigor2760 or zyxel VMG1312-B10A working that way, on booth stock and Merlin fw. No issues at all. Only difference is that I don't have any vlan setup as for standard UK connection vlan id 101 is set in modem.

Looks like I have to learn a lot...  :) But this is fun! Learning IS Fun.. Is not?

Any chance for (more)CLEAR tutorial how to do it for all people like me(green)? Please

In example: This does not exist in my menu:
Quote
Then go to Advanced Settings > WAN >  Internet Settings and Select – Get the Wan IP Address Automatically, and select the No radial button
(https://tombassist.uk/pliki/r7000.jpg)
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 11:51:52 AM
You have above instructions how to setup asus, in thread to which I post link are instructions above my post how to configure zyxel for one cable operation.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 11:53:45 AM
You have above instructions how to setup asus, in thread to which I post link are instructions above my post how to configure zyxel for one cable operation.

I do not have this in my menu:
Quote
Then go to Advanced Settings > WAN >  Internet Settings and Select – Get the Wan IP Address Automatically, and select the No radial button

So my journey is over.... regarding one cable and no commands...
If I use static IP option I can get access to my Modem but NO INTERNET then...
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 11:55:03 AM
Post screenshot once you go to wan tab on your router.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 11:55:53 AM
(https://tombassist.uk/pliki/r7000.jpg)
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 11:56:54 AM
Wan connection type on yours is set to automatic IP, what's other options on drop down list?
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 11:58:43 AM
Static IP - never got it work - tested million times
PPPoe
PPTP
LT2P
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 12:00:26 PM
Choose PPoE and show other screenshot.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 12:02:19 PM
Choose PPoE and show other screenshot.

It will ask me for user name and password...

I dont need that with TalkTalk...
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 12:05:26 PM
That's fine, but also there are different options which are in instructions. If you setup modem in bridge, authentication going from router. If there is no user name and password required leave it empty, and see if you can setup other options as per instruction.
Title: Re: Access Zyxel Behind Netgear AP
Post by: zvirus on May 07, 2020, 12:17:02 PM
THANK YOU!

I`ll try it...

Cheers!
Title: Re: Access Zyxel Behind Netgear AP
Post by: mrk26 on May 07, 2020, 12:44:46 PM
Also believe that you should setup VLAN id in modem so router don't have to do it.
Title: Re: Access Zyxel Behind Netgear AP
Post by: hushcoden on May 07, 2020, 11:03:24 PM
I used an Asus router a while ago connected to a VMG1312-B10A in bridge mode and I was able to configure it following the guide here: https://kitz.co.uk/routers/zyxel_VMG8324-B10A_bridge.htm

So, in your case you must be doing something 'different' if you cannot make it work...

Besides, while playing around with the Asus router with Merlin firmware, I found out that for 1-cable solution all I needed was to add a script named wan-start to /jffs/scripts folder as follow (no iptables required):
Code: [Select]
#!/bin/sh
sleep 20s
ifconfig $(nvram get wan0_ifname):0 192.168.2.2 netmask 255.255.255.0

and 192.168.2.1 was my modem IP address

Cheers.
Title: Re: Access Zyxel Behind Netgear AP
Post by: Weaver on May 08, 2020, 12:57:53 AM
@zvirus well done, good for you. I had a nightmare job working out what I was supposed to be doing trying to get stats from my ZyXEL VMG 1312-B10A modems (in modem-only mode), four of them [!] connected to my Firebrick FB2700 router. The router was unsurprisingly not copying stats info packets through from the admin interfaces of my modems to the the main LAN so I could access them and vice versa. Another problem which I never solved was that the modems’ admin interfaces were not fully configured properly for IPv4 in that the config could set up an IPv4 address for the admin i/f and could define a netmask but could not as far as I could see define a default gateway. The breakthrough in my case was the idea of getting the router to rewrite the IPv4 headers of packets intended for the modem so that the source address was something that referred to something chosen to refer to the router itself (not the original source address, ie. the sending machine in the main LAN, as that was too hard for the ill-configured modem to cope with); this was a source address that was such that when a packet was replied to, the return packet would have a destination address within that link’s address range according to the netmask and would not require lookup of an in this case non-existent default gateway to route the packet off the link. A modem’s admin i/f is at 192.168.n.1 where n is 1,2,3,4 according to which modem it is, and the router’s modem-facing i/f address on that link is 192.168.n.254. The router forcibly rewrote the IPv4 headers by using rewriting firewall rules combined with NAT so as to be able to remember the redirection required for the returning packet.