Networking: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
[[ | [[Category:networking]] | ||
[[Category:Linux/Unix]] | |||
==Check network connections== | ==Check network connections== | ||
| Line 23: | Line 24: | ||
;<code>openssl s_client -showcerts -connect <IP>:443</code> | ;<code>openssl s_client -showcerts -connect <IP>:443</code> | ||
:Test SSL connection | :Test SSL connection | ||
==Interfaces== | |||
;ifconfig -a | |||
:Show all network interfaces | |||
;ifconfig <interface> <ipaddrss> | |||
:Assign <ipaddress> to <interface> | |||
;mii-tool <interface> | |||
:Show interface link status (speed) | |||
==Tunneling== | ==Tunneling== | ||
Revision as of 11:37, 9 June 2019
Check network connections
Netcat
nc -v -z <host> <port>- Tell me if we can open a connection to <host> on <port>. Without -z it works like telnet
nc -v -u -z <host> <port>- Tell me if we can open a connection to <host> on a UDP <port>
Curl
curl -vvv -k --proxy1.0 <proxyIP>:<proxyPort> <Remote URL>- Get the data from <remote URL> via <proxyIP> -k allows insecure SSL connections
curl -vvv telnet://<IP>:<port>- Just test connectivity to a port
Wget
wget <URL>- Get the data from <URL>
openssl
openssl s_client -showcerts -connect <IP>:443- Test SSL connection
Interfaces
- ifconfig -a
- Show all network interfaces
- ifconfig <interface> <ipaddrss>
- Assign <ipaddress> to <interface>
- mii-tool <interface>
- Show interface link status (speed)
Tunneling
ssh -L 8080:remotehost:3006 proxy- Login over ssh to proxy and there connect to remotehost port 3006. Connect local port 8080 to the remote connection.
- Now if you connect to port 8080 on your local server you are connected to port 3006 on the remotehost
- Using
-nNTprevents that the ssh command opens a terminal on the proxy. The ssh command however must remain active.