←September→
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
|
|
|
|
|
|
|
Wed, Sep 25, 2024 10:17 pm
Viewing network connections on a Microsoft Windows system by protocol
If you just wish to see
TCP ports in use on a Microsoft Windows system,
you can issue the
netstat -a -p TCP
command at a command prompt.
The
-a
parameter specifies all connections and listening
ports should be displayed while the
-p
parameter can be
used to select a
protocol from TCP,
UDP, TCPv6, or UDPv6. If used with the
-s
option to display per-protocol statistics, the protocol
argument may be any of:
IP,
IPv6,
ICMP, ICMPv6, TCP, TCPv6, UDP, or
UDPv6. If you only wish to view IPv6 TCP ports in use,
you can use
netstat -a -p TCPv6
. If you only wish to
see currently established connections, you can
pipe the output of
the
netstat
command to the
find
command. E.g.,
netstat -a -p TCP | find "ESTABLISHED"
. Or, if you wished to
see all of the TCP ports on which the system was listening for a connection,
you could use
netstat -a -p TCP | find "LISTENING"
. If you
wanted to see connections to a particular port, e.g., 22, for Secure
Shell (SSH) connections, you could use
netstat -a | find ":ssh"
, which would show the IP addresses of the remote systems connected
via SSH, or
netstat -a | find ":https"
for
HTTPS connections to web sites. If you wished to see host names rather than IP addresses, you could
add the
-f
option, which displays a
Fully Qualified Domain Name
(FQDN) instead of an IP address for a remote system. E.g.,
netstat -a -f | find ":https"
. Since SSH, HTTP, and HTTPS
use TCP rather than UDP transmissions, you don't need to add the
-p
parameter.
[/os/windows/network]
permanent link
Tue, Sep 24, 2024 8:53 pm
Extracting files from a .jar file with the jar command
If you have a
JAR ("Java archive") file and wish to extract the files contained within
it from a
command-line interface (CLI) on a Microsoft Windows system,
you can do so by
opening a command
prompt window and using the
jar xf filename.jar
command,
where
filename.jar is the relevant .jar file, if you have
the
Java
Development Kit (JDK) installed on the system — the JDK software
can be downloaded for free from Oracle's
Java Downloads
page.
Minecraft uses
.jar files for mods and if you wish to view the models (.json files), textures
(.png files) within a JAR file used by Minecraft, you can use the
jar xf filename.jar
command to see those. If you
copy the .jar file to a directory where you wish to extract its contents
and then run the command from the directory in which the .jar file is located,
you should see a directory named assets
appear beneath which you
can find blockstates
, lang
, models
, and
textures
subdirectories.
The .json files files, such as those you may see in a models/block
subdirectory are
JavaScript Object Notation (JSON)
files, which you can view or edit in a text editor, such as the
Windows Notepad
application. The .png files, which you may see in a textures
subdirectory are Portable Network Graphics (PNG) files, which you can
view or edit in graphics applications such as
Microsoft Paint
on Microsoft Windows systems. You can also use a tool such as
Blockbench to work with the
JSON model files and PNG images.
[/os/windows/software/games/minecraft]
permanent link
Mon, Sep 23, 2024 7:54 pm
Changing the name of a Cisco switch
To change the name of a Cisco network switch, you can use
the command hostname newHostname
where
newHostname is the new name you wish to apply to the switch. To
make the change permanent so the new name is still in place after a reboot,
you can follow the command with the write memory
command.
Switch>
Switch>enable
Password:
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Styx
Styx(config)#end
Styx#
*Sep 23 01:14:23.917: %SYS-5-CONFIG_I: Configured from console by console
Styx#write memory
Building configuration...
[OK]
Styx#
[/hardware/network/switch/cisco]
permanent link
Sun, Sep 22, 2024 9:50 pm
Changing the default gateway address on a Cisco switch
For a Cisco network switch, to change the
default gateway
address, i.e., to specify the IP address of a router that the switch will
use, enter privileged EXEC mode with the enable
command, then
enter configuration mode with the command configure terminal
and then set the default gateway address with the command ip
default-gateway gatewayIPAddress
where gatewayIPAddress
is the address for the router you wish the switch to use. Then exit
configuration mode with the end
command. To make the change
permanent, so that it will persist after a reboot of the switch, enter
the command write memory
.
Switch>enable
Password:
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip default-gateway 192.168.1.1
Switch(config)#end
Sep 23 01:26:53.415: %SYS-5-CONFIG_I: Configured from console by console
Switch#write memory
Building configuration...
[OK]
Switch#
You can view the default gateway address with the command
show ip default-gateway
.
Switch>show ip default-gateway
192.168.1.1
Switch>
[/hardware/network/switch/cisco]
permanent link
Mon, Sep 09, 2024 3:07 pm
SolarWinds TFTP Server for Microsoft Windows Systems
If you need a system running a Microsoft Windows operating system to
function as a
Trivial
File Transfer Protocol (TFTP) server, one free solution is the
SolarWinds TFTP
server program available from the company's website at
TFTP
Server. After installation of the software, if you open the
application, you will see that the TFTP service is started and listening
for data on
User Datagram Protocol (UDP) port 69.
If you open a
command prompt window and issue
the command netstat -anp udp
and
pipe the output
into the find
, you should also see the system is listening
on all network interfaces, i.e., 0.0.0.0, on UDP port 69.
C:\Users\Public\Downloads>netstat -anp udp | find "0.0.0.0:69"
UDP 0.0.0.0:69 *:*
C:\Users\Public\Downloads>
The installation program also installs a TFTP service, which is
set to run automatically when Windows boots; you can see information
on the service if you open Services and scroll through the list of
services on the system — you can open a Services window by
typing services.msc
at a command prompt window and hitting
Enter.
[ More Info ]
[/network/tftp]
permanent link
Sun, Sep 08, 2024 8:34 pm
Deleting all lines that don't begin with specific text in vim
In the
vim
text editor, if I want to remove every line in a file that does not contain
the word "FALL" in capital letters, I can use
:v/FALL/d
, i.e.,
type the colon key and then
v
, which works
like the
grep command
grep -v
to select only lines in a file that don't contain a
specified text
string.
The particular text on which you wish vim to searh is preceded and followed by
the
slash
delimiter with a
d
at the end to specify you wish those lines
not containing the text, e.g., FALL in this case, to be deleted. If I want to
delete only those lines that begin with FALL, I can use
:v/^FALL/d
as the
caret specifies that the text should occur at
the beginning of lines (a dollar sign, $, would indicate I wanted to select
only lines where the text was found at the end of the line). Note:
you can also use
:g!/^FALL/d
to achieve the same end —
without the exclamation mark after the global
command
, all
lines containing FALL would be deleted, but as the exclamation mark
represents "not", all lines not containing FALL at the beginning of the line
are deleted.
[/editors/vi]
permanent link
Sat, Sep 07, 2024 9:58 pm
Locating DHCP servers on a LAN from a Microsoft Windows system
If you need to determine the
IP addresses of
systems on a
local area network (LAN) that are functioning as
Dynamic Host Configuration Protocol (DHCP) servers, one tool that you
can use on systems running a Microsoft Windows operating system is
dhcptest, developed
by
Vladimir Panteleev, aka
CyberShadow, a
Moldovan developer.
He provides a compiled version of the program for Windows systems at
dhcptest — there are
32-bit and
64-bit versions
of the program there.
When you open the program, type d
to have the program send
a DHCP discover packet, which should result in responses from DHCP servers
on the LAN. You can type Ctrl-C
or q
to quit
the program.
[ More Info ]
[/network/dhcp]
permanent link
Privacy Policy
Contact