From your original post, I can't tell which of the following scenarios you are trying to achieve:
1. Multiple internal targets for the same port number depending on the originating IP address
- Port 1080 traffic from IPs a, b, c goes to internal host 1
- Port 1080 traffic from IPs d, e, f goes to internal host 2
- etc.
2. A single internal target for incoming traffic that only works from a restricted set of remote IPs
- Port 1080 traffic is forwarded to internal host 1
- Traffic on port 1080 that is not from IPs a, b, or c is blocked
Scenario 2:
This is easily achievable on your SME server using the db setting 'AllowHosts', as described here:
http://wiki.contribs.org/DB_Variables_Configuration#Additional_information_on_customizing_iptablesScenario 1:
I think this will work too - you would need to create multiple custom services that use the same port but have different (non-overlapping) "AllowHosts" settings (if you define overlapping AllowHosts ranges, the first one encountered in /etc/init.d/masq will trigger, and override any other settings).
If the port in question is serving http content, you should be able to create a solution using
ProxyPass with a 'ValidFrom' setting.