I am making a bastion ssh server. When I use the following rules in its ip tables, I am able to connect to the server just fine:
Inbound Rules
- Allow traffic on port 22 from my client's IP
- Block all other traffic
Outbound Rules
- Allow all traffic to my client's IP
- Block all other traffic
My understanding is the server randomly chooses an outbound port to complete the ssh connection when a valid client calls.
- What range of integers does the system select from to choose this port?
- Can I tell my system which range of ports to use?