What's new

Solved How to access my ONT from router

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Thanks to both once again! top notch support and kindness!
Tonight when I get home I'll try Colin's approach to avoid any of the issues he stated (I'm using CTF + FA if it counts).

Just to win some time: if it works I do have to add it to wan-start script to make it permanent, don't I?
And to undone changes just delete that line from script and reboot, right?

Will report back with results!
THANKS!

Yes, you will need a wan-event script. I have an example that Colin wrote that I can post on Sunday if you need help. Won't be near a computer till then.
 
Yes, you will need a wan-event script. I have an example that Colin wrote that I can post on Sunday if you need help. Won't be near a computer till then.
Thanks! I think I can handle the script, from what I know it should be more or less like this
#!/bin/sh
# Allow ONT access from LAN
ifconfig $(nvram get wan0_ifname):0 192.168.100.2 netmask 255.255.255.0
exit
Regards!
 
Just to win some time: if it works I do have to add it to wan-start script to make it permanent, don't I?
And to undone changes just delete that line from script and reboot, right?
Correct. As you have an RT-AC87U your firmware will be 384.13_10. This predates the inclusion of the wan-event script AFAIK. So you will have to use wan-start.
 
Correct. As you have an RT-AC87U your firmware will be 384.13_10. This predates the inclusion of the wan-event script AFAIK. So you will have to use wan-start.
Yes, I'm under last Merlin's (384.13_10). Will then add the line to wan-start if it works.
Can wait to test it, thanks to both of you for sharing your knowdledge with me in such a gentle way.

I must agree with Jeffrey that you Colin are amazingly talented and equally kind, its not the first time you help me (and certainly not the last! lmao :p)
 
In about a year and a half, I hope to have some additional free time. I can't wait. The wife just retired and I am mega jealous
 
Doesn't the sun shine brighter when things work as they should? :)
 
That's good news. I had also been thinking that you probably don't need to create an eth0:0 interface at all. But rather just reuse eth0 by assigning an IP address to it:

Code:
ifconfig eth0 192.168.100.2 netmask 255.255.255.0

Whether one way or the other is "better" is probably a matter of opinion.
Thank you @ColinTaylor, thank you a lot because your method worked flawlessly in my Nokia G-010G-P ONT and my Asus RT-AC68u with 380.70 Asuswrt-Merlin with your code:
Code:
ifconfig eth0 192.168.100.2 netmask 255.255.255.0
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
Now I am trying to make this persistent after router's reboot with some jffs script. The problem is if I add those two lines to my preexisting services-start it seems only the first line is executed but not the second one:
Code:
#!/bin/sh
vconfig add eth0 105
ifconfig vlan105 up
robocfg vlan 105 ports "0t 1t 7t"
/sbin/arp -s 192.168.0.2 12:34:56:78:90:12
/sbin/arp -s 192.168.0.3 AB:CD:EF:AB:CD:EF
ifconfig eth0 192.168.100.2 netmask 255.255.255.0
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
When I check that after reboot if I type "ifconfig" the eth0 adapter has a 192.168.0.2 address set but the iptables rule wasn't executed. I hat to manually type "iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE" again (over telnet or SSH) and then I can reach my 192.168.100.1 ONT web address again.
How could I do it persistent?
 
I presume you actually mean 192.168.100.2 and not 192.168.0.2?

Put the iptables command in nat-start
Yes, it's 192.168.100.2 and not 192.168.0.2, sorry for my mistake. You're right again because if I place the iptables command in services-start it doesn't work but if I put that in a new created nat-start script it works perfect and it's persistent after reboot:



Thank you again @ColinTaylor, this is working perfectly now!
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top