You can port forward a range of ports using group mappings. Just ensure that your Juniper ScreenOS is setup for VIP multi-port. Unfortunately due to the nature of the VIP (Virtual IPs) you need to specify all the ports via the VIP commands. There is no quick and easy way to do that. After that bit of pain the NAT translates are fairly straight forward. The only time consuming portion is to create the VIPs. I suggest doing so in notepad (or notepad++) to get the commands in line and then copy/paste to the CLI.
To do this ensure the following is enabled on the router:
set vip multi-port
Reboot the router to enable this and then enter the CLI once again to continue the confirguration.
From there you would setup the port groups to a service object:
set service "<name here>" protocol tcp src-port 1024-65535 dst-port 10-20
set service "<second name here>" protocol tcp src-port 1024-65535 dst-port 30-40
If the ports needing to be opened are also necessary for UDP you would need additional lines:
set service "<UDP name>" protocol udp src-port 1024-65535 dst-port 10-20
set service "<Second UDP name here>" protocol udp src-port 1024-65535 dst-port 30-40
Then create the Virtual IP address interfaces:
## X.X.X.X = Public IP
## Y.Y.Y.Y = Private IP
set interface ethernet0/0 vip X.X.X.X 10 "10" Y.Y.Y.Y
set interface ethernet0/0 vip X.X.X.X 11 "11" Y.Y.Y.Y
set interface ethernet0/0 vip X.X.X.X 12 "12" Y.Y.Y.Y
...
set interface ethernet0/0 vip X.X.X.X 40 "40" Y.Y.Y.Y
Then setup the NAT translates for the port group services you want to open up:
set interface ethernet0/1 zone Untrust
set interface ethernet0/1 ip <public IP>/<CIDR>
set interface ethernet0/2 zone dmz
set interface ethernet0/2 ip <private IP>/<CIDR>
set interface ethernet0/1 vip untrust-ip <port> "<service name>" <private IP address>
set interface ethernet0/1 vip untrust-ip <next port> "<service name>" <private IP address>
set policy from untrust to dmz any vip(ethernet0/1) "<service group name>" permit
set policy from untrust to dmz any vip(ethernet0/1) "<next service group name>" permit
....
set policy from untrust to dmz any vip(ethernet0/1) "<last service group name>" permit
What you're asking to do is not relatively simple using the Juniper CLI but it can be done provided you know exactly what is needing to be done. There is plenty of documentation out there on the Juniper site, just find the version you want and read into it. Please also note that you are suggesting to use ports 10-20 and 30-40 for services. Those are generally assigned as follows:
10 TCP UDP Unassigned
11 TCP UDP Active Users (systatservice)
12 TCP UDP Unassigned
13 TCP UDP Daytime Protocol (RFC 867)
14 TCP UDP Unassigned
15 TCP UDP Previously netstat service
16 TCP UDP Unassigned
17 TCP UDP Quote of the Day
18 TCP UDP Message Send Protocol
19 TCP UDP Character Generator Protocol (CHARGEN)
20 TCP UDP FTP data transfer
21 TCP FTP control (command)
22 TCP UDP Secure Shell (SSH)—used for secure logins, file transfers (scp, sftp) and port forwarding
23 TCP UDP Telnet protocol—unencrypted text communications
24 TCP UDP Priv-mail : any private mail system.
25 TCP Simple Mail Transfer Protocol (SMTP)—used for e-mail routing between mail servers
26 TCP UDP Unassigned
27 TCP UDP NSW User System FE
29 TCP UDP MSG ICP
33 TCP UDP Display Support Protocol
35 TCP UDP Any private printer server protocol
37 TCP UDP TIME protocol
39 TCP UDP Resource Location Protocol (RLP)—used for determining the location of higher level services from hosts on a network
40 TCP UDP Unassigned
Hopefully this will give you an idea as to what needs to be done for the Juniper using the CLI and essentially what would be necessary prior to just jumping into using VIP itself for port forwarding. Some considerations would be necessary.