cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Speedtouch NAT via CLI

starfry
Rising Star
Posts: 303
Thanks: 23
Fixes: 2
Registered: ‎14-09-2007

[SOLVED] Speedtouch NAT via CLI

I am pulling my hair out trying to do something that should be trivial. I am trying to use the Speedtouch CLI to set up a NAPT rule because the web gui "game and applicatin sharing" is so lacking that it just dosn't work reliably.
I am doing this:
{admin}[nat]=> mapadd intf=Internet type=napt outside_addr=xxx.xxx.xxx.xxx inside_addr=192.168.100.140 protocol=tcp outside_port=333 inside_port=333 mode=auto
The rule appears to get set up (maplist shows it) but it doesn't work. The web gui does not show it and I can't see the port open from outside.
I presume I am missing something... Can anyone enlighten me please?
Thanks.
2 REPLIES 2
npr
Pro
Posts: 1,898
Thanks: 119
Fixes: 9
Registered: ‎21-01-2013

Re: Speedtouch NAT via CLI

You need to use the catch all IP 0.0.0.1 for the outside address. That is unless you wish to restrict it to a specific outside IP.
You also need to create a firewall rule to allow this incoming connection.
This may give you the general idea.
http://npr.me.uk/forwardports.html
There is a cli command which will assign a PF rule which was previously created in the GUI.
Sorry I don't have a Technicolor router running here to dig out that command, but it shouldn't take much finding.
Edit:
One of the reasons people have problems with the routers GUI port forwarding is because the device is on a static IP address. Try a dynamic (DHCP) address for the device and in the routers network settings tick "always use the same IP address"
starfry
Rising Star
Posts: 303
Thanks: 23
Fixes: 2
Registered: ‎14-09-2007

Re: Speedtouch NAT via CLI

Ok I worked it out by looking at a backup file and some guesswork.
You don't use "nat mapadd", what you do is this:

service host add name="Mail Server"
service host rule add name="Mail Server" protocol=tcp portrange=25-25
service host assign name="Mail Server" host=10.0.200.11 log=enabled

And, in case you want to remove it

service host disable name="Mail Server"
service host delete name="Mail Server"

Quote from: npr
One of the reasons people have problems with the routers GUI port forwarding is because the device is on a static IP address.

I have a static IP address but I don't think that's the problem, as I have it working now. The problem is the router CLI is very badly documented (a command list doesn't suffice without information on how to use them) and the web gui just plain sucks. I mean... why on earth does adding a "game and application sharing" rule cause the router to drop its DSL connection? And why does adding a "game and application sharing" rule dropdown not contain all my hosts in DNS and why does the box to type in an address not always appear. Because it sucks big time. Why on earth is it called "game and application sharing"? Sorry **rant over**. I just wasted over two hours on this  Angry