davidktw
Arch-Supremacy Member
- Joined
- Apr 15, 2010
- Messages
- 13,550
- Reaction score
- 1,302
Given the following architecture scenario
Describe how you can connect from system(L) via
Produce the *EXACT* CLI commands of doing so.
You can assume you are made available to the latest
No other tools other than the
Below is sample output for your consideration which does not save to file, but display the HTTP response headers on screen.
This time round the challenge is not about programming languages but on networking concepts and your understanding on your tools.
This is also an industrial use case that is useful even today.
Feeling up to it ?

- You have a remote linux system (R), that is located remotely within a private network where the linux firewall only allows SSH connection to be established to it from your personal linux system (L). The firewall governing the remote system (R) will not allow any outgoing connection established from the server itself to anywhere else.
- Your personal linux system (L) in office has Internet access to anywhere. You can remotely access the remote system (R) via SSH.
Code:
$ sudo iptables -nvL
Chain INPUT (policy DROP 2 packets, 712 bytes)
pkts bytes target prot opt in out source destination
280 25910 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW,ESTABLISHED tcp dpt:22
2 115 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 24 packets, 1776 bytes)
pkts bytes target prot opt in out source destination
164 22518 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state ESTABLISHED tcp
2 115 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
Describe how you can connect from system(L) via
ssh remotely over the Internet to system(R) and execute curl commands in system (R) to retrieve webpage contents at urls 'https://www.google.com', 'https://www.yahoo.com', and 'https://www.bing.com/' respectively, and save them on files in system (R).Produce the *EXACT* CLI commands of doing so.
You can assume you are made available to the latest
openssh and curl utilities.No other tools other than the
bash, openssh and curl are available to you.Below is sample output for your consideration which does not save to file, but display the HTTP response headers on screen.
Code:
$ ssh ... user@remote_server
Welcome to ...
...
Last login: ...
$ curl -I ... 'https://www.google.com'
HTTP/2 200
content-type: text/html; charset=ISO-8859-1
cross-origin-opener-policy-report-only: same-origin-allow-popups; report-to="gws"
report-to: {"group":"gws","max_age":2592000,"endpoints":[{"url":"https://csp.withgoogle.com/csp/report-to/gws/other"}]}
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
date: Tue, 27 Dec 2022 22:31:32 GMT
server: gws
x-xss-protection: 0
x-frame-options: SAMEORIGIN
expires: Tue, 27 Dec 2022 22:31:32 GMT
cache-control: private
set-cookie: 1P_JAR=2022-12-27-22; expires=Thu, 26-Jan-2023 22:31:32 GMT; path=/; domain=.google.com; Secure
set-cookie: AEC=AakniGOowkox6z-fsyi4MwiwwzxbW9k4Oq19ivKAfUjCNy4fZh_gcdLrow; expires=Sun, 25-Jun-2023 22:31:32 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
set-cookie: NID=511=As_zU8imjFIzMhe_Rm1L_A2fl-DONxMgt49arEt-yGgG3iyHXXfk-2w-f5foiT7DwDT9RdRwJKw92nlyfxT7htzX2zDDpWKApEYMJTcRBVj7rWJ1PSVo440hac8hpJphLdUYH2I0n1mF8E_AAm-PlvDxKE1Rs5IHBnHfaehgOpE; expires=Wed, 28-Jun-2023 22:31:32 GMT; path=/; domain=.google.com; HttpOnly
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
This time round the challenge is not about programming languages but on networking concepts and your understanding on your tools.
This is also an industrial use case that is useful even today.
Feeling up to it ?
Last edited: