Ok, so recently I had an issue with my lovely unifi system dropping download / upload speeds. I have a VDSL2 connection from EE (aka BT) and the first thing I thought I would do is see what my line's up/down sync speeds were on the DrayTek Vigor 130 modem. Now, I was going to remove the ethernet cable from my Unifi USG and hook my PC directly up to the Vigor 130. However, I remembered a visitor to this site had commented on my other Vigor 130 setup guide regarding allowing the LAN to access the Draytek Vigor 130 directly (so no need to mess about swapping cables). As such, I thought I would give it a try and document it here.
Now, before you jump straight into the below steps, it's worth noting that this guide assumes your DrayTek's modem IP is 192.168.2.1 and your USG has the usual 192.168.1.1/24 Gateway/Subnet. If you have changed these yourself, you will need to modify the steps accordingly.
Ok, so lets get started.
The first thing you will need is a SSH client such as Putty (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html). Once you have downloaded it, open it up from a computer that is on the network which is hooked up to your USG.
Open up putty and put the IP of your USG in the hostname box. This is usually 192.168.1.1 with port 22. Then click "Open" at the bottom.
Enter your username and password as requested. If you do not know your USG SSH login details, they can be found via the controller admin under Setting > Site > "Device Authentication". If you have not altered your USG from default, the username and password will be 'ubnt'.
Once you have logged in, copy the below text and paste it into putty and run it. On windows, you can simply right click in putty to paste copied text and run it at the same time. If you have changed your Vigor's default IP from 192.168.2.1, update it here accordingly.
configure set interfaces pseudo-ethernet peth0 link eth0 set interfaces pseudo-ethernet peth0 address 192.168.2.100/24 set interfaces pseudo-ethernet peth0 description "Access to modem" commit save exit
Next copy and paste in (again change the IP if your DrayTek's modem is not the default 2.1):
configure set service nat rule 5000 type masquerade set service nat rule 5000 destination address 192.168.2.1 set service nat rule 5000 outbound-interface peth0 commit save exit
Assuming you do not get any error messages, you can now close putty.
Open a browser and go to 192.168.2.1 (your DrayTek Vigor 130 modem's IP). This should then redirect you to http://192.168.2.1/weblogin.htm where you can then log into your modem's admin. By default, the login username is admin and the password is admin (if you haven't already changed this then I would suggest changing it).
You can now see your VDSL line stats via "Online Status" > "Physical Connection". As you can see in the below picture, the download speed is 79995(Kbps) and the upload is 15493Kbps.
You can also do a firmware upgrade if required via "System Maintenance" > "Firmware Upgrade". It's worth noting that if you are a BT customer (or like me an EE customer who in turn uses BT's lines), DrayTek have a BT firmware version specifically for the DrayTek Vigor 130. It can be downloaded from https://www.draytek.co.uk/support/downloads/vigor-130.
Hope this helps.
Please note, if you re-provision your USG, it will forget the above. You can re-do the above to add it back in but to get around this, you can create a config.gateway.json in /srv/unifi/data/sites/default/config.gateway.json (1st Gen cloud key) with the below in it.
{ "interfaces": { "pseudo-ethernet": { "peth0": { "address": ["192.168.2.100/24"], "description": "Access to Modem", "link": ["eth0"] } } }, "service": { "nat": { "rule": { "5000": { "destination": { "address": ["192.168.2.1"] }, "outbound-interface": ["peth0"], "type": "masquerade" } } } } }
If this guide has helped you or if you feel it could be improved, please let us know in the comments below.
![]() |
Which hosting company do you use? I'm Philip and this little website is my online side project. I often get asked which company I use for my website projects. Most of the hosting companies out there are no longer independent but instead owned by one of the big hosting giants who generally offer poor or average services (in my opinion). Krystal.uk (the company I use) are still independent (UK based) and go against everything the big companies stand for. Fast servers, good tech support and they actually re-invest a huge chunk of their profits to keep improving their services. All Krystal customers can offer people a £20 referral discount. If you do move to Krystal, please consider using the discount code "WMG" to get £15 off your hosting order (Krystal will give me the remaining £5 for referring you). Thanks again and happy surfing. |