Thank you, may I ask what version your HG612 & Asus 86u are on?
Also what is benefit of IP tables an how to do it?
HG612 is;
Hardware version VER.B
Software version V100R001C01B030SP08
Firmware version A2pv6C038m.d24j
86U is Firmware Version:384.8_2 (however I need to update to the latest 384.11_2 really, the below will all still work exactly the same).
When you unlock the HG612 you define a local subnet/IP for it's administration. Make this something different to your main LAN subnet!
Then you add a rule in the router to allow access to this modem admin subnet from your LAN (by adding a secondary IP to the WAN interface and an iptables rule to NAT to that IP for that specific subnet only).
Without this you would have to physically plug your computer into the modem every time you want to access it's admin page (admittedly not a common thing, but if you are diagnosing something the last thing you want to do is start unplugging/replugging stuff which may muddy the waters).
As for the how...
Install Merlin FW
Enable JFFS partition and scripts
I have in my /jffs/scripts/services-start the following lines. I'm not sure if it may be better to have it in firewall-start but it works for me where it is!
Code:
ifconfig $(nvram get wan_ifname):1 10.11.20.254 netmask 255.255.255.0
iptables -t nat -I POSTROUTING ! -s $(nvram get lan_ipaddr) -d 10.11.20.0/24 -j SNAT --to 10.11.20.254
logger Set routing to BT Openreach Modem
Make sure you make the script executable once it's created with;
Code:
chmod a+x /jffs/scripts/services-start
This assumes the subnet you put the modem in was 10.11.20.0/24.
So my setup is;
Router LAN = 10.11.12.0/24
Router LAN IP = 10.11.12.1
Modem Admin LAN = 10.11.20.0/24
Modem Admin IP = 10.11.20.1
Router WAN:1 IP = 10.11.20.254
Basically if you give the modem IP 10.11.20.1 you can use my script exactly as is (your Router LAN is not really relevant, just so long as it's not 10.11.20.0/24! So can use the default one if you wish).
Then, from any device in your Router LAN, put 10.11.20.1 into the browser and you'll be on the modem.
Hope that makes sense!