I need help understanding the security implications of having an outgoing ssh tunnel in my system (what is the risk and could it be a security hole?).
I am using the following command to forward port 8080 in an internal system to 8080 in a remote host. I want to be able to forward traffic going to localhost:8080 to the remote host at port 8080.
ssh -f -N -L 8080:<remote_ip>:8080 user@<bastion_host> This is a diagram of what I'm doing:
------------ --------- ------------------ | remote:8080| <--- | bastion | <----- |internal host:8080| ------------ --------- ------------------ These are my questions:
- Would it be possible for a potential attacker in the remote system to leverage an exploit that uses the port forwarding tunnel I have in place to get access to the internal host?
- Since this is a TCP connection, is there a socket going back to the internal host that an attacker could use?
I just want to know if this is at all possible or if there are safeguards in ssh to protect against this.
Thanks!