Network management: Difference between revisions
Get public IP address from CLI |
→Get public IP address from CLI: add a third option |
||
Line 48: | Line 48: | ||
== Get public IP address from CLI == | == Get public IP address from CLI == | ||
<source lang=" | <source lang="console"> | ||
$ dig +short myip.opendns.com @resolver1.opendns.com | $ dig +short myip.opendns.com @resolver1.opendns.com // this one doesn't seem to work | ||
$ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}' | $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}' | ||
$ wget -qO- http://ipecho.net/plain | xargs echo | |||
</source> | </source> |
Revision as of 10:25, 11 July 2019
- Last tested on Ubuntu 16.04 LTS (xenial) & Windows 10.0.10586
at the end of /etc/samba/smb.conf add a share config.
[ea]
comment = pistis - echo admin
path = /var/www/ea
admin users = mhan
read only = No
create mask = 0755
then add the Samba account.
$ sudo smbpasswd -a mhan
then restart samba
$ sudo systemctl restart smbd.service nmbd.service
then on Windows execute the following. For the username, you may have to enter it in the form mhan@pistis or pistis\mhan. Enter the password you used when you added the Samba account for the user.
C:\>net use Z: \\pistis\ea /savecred /persistent:yes
Checking the accessibility of a port through the network
Checking if port 8080 is accessible on pisteo.example.com
$ sudo hping3 -T -t 1 -p 8080 pisteo.example.com
Tracing a route
$ traceroute pisteo.example.com
Get public IP address from CLI
$ dig +short myip.opendns.com @resolver1.opendns.com // this one doesn't seem to work
$ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}'
$ wget -qO- http://ipecho.net/plain | xargs echo