ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 347 - XK0-005 discussion

Report
Export

A Linux administrator needs to forward port 8000 on a remote server to port 8000 on a local server. Which of the following commands should the administrator run on the local server to achieve this goal?

A.

firewall-cmd --add-forward-port=port=8000 =tcp =8000 =remote

Answers
A.

firewall-cmd --add-forward-port=port=8000 =tcp =8000 =remote

B.

iptables -A FORWARD -m state -p tcp -d remote --dport 9000 -j accept

Answers
B.

iptables -A FORWARD -m state -p tcp -d remote --dport 9000 -j accept

C.

ssh -R 8000:localhost:9000 remote

Answers
C.

ssh -R 8000:localhost:9000 remote

D.

socat TCP4-LISTEN:8000,fork TCP4:remote:8000

Answers
D.

socat TCP4-LISTEN:8000,fork TCP4:remote:8000

Suggested answer: C

Explanation:

The ssh -R command sets up reverse port forwarding, which allows connections from the remote server to be forwarded to the local machine. In this case, ssh -R 8000:localhost:9000 remote will forward traffic on port 8000 on the remote server to port 9000 on the local machine.

asked 09/10/2024
SERGIO MELOSEVICH
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first