IPTables Help

I'm trying to figure out how to work with IPTables on something. I normally have SSH running on a random port (let's call it 2345), but need SSH to respond on port 22 for BurstNet's monitoring. Using IPTables, I'd like to forward port 22 to port 2345 (using a NAT feature?), and then deny access to port 22 for everyone except for 4 IP ranges ( 64.191.0.0/17, 66.96.192.0/18, 66.197.128.0/17, and 68.38.0.0/16). I'm pretty sure that this can be done easily, I'm just not sure how to do the port forwarding or the blocking of IPs on a single port though. Can anybody help with this?

Thanks! - Matt

 

 

 

 

Top