Two Methods:
- Add sleep in the entry of main loop
- With GDB command:
set follow-fork-mode mode (parent/child)
set detach-on-fork mode (on/off)
Two Methods:
set follow-fork-mode mode (parent/child)
set detach-on-fork mode (on/off)
Unlike ssh, stunnel dosen’t support the reverse tunnel by it’s self.
With the help of tgcd ( TCP/IP Gender Changer Daemon ), we are able to setup a reverse tunnel by chain the tgcd and stunnel:
For example:
We try to access the corp server from home, but due to the NAT firewall of the corp, only out going 80/443 port are opened:
client ==> tgcd LL node (home server) ==> tgcd CC node (corp agent) ==> corp server:
Home Server:
Launching tgcd daemon in LL mode:
tgcd -L -q 2222 -p 22222
Listen on port 2222 for client access
Listen on port 22222 for tgcd CC access
Launching stunnel in server mode:
/usr/local/bin/stunnel /etc/stunnel/stunnel_server.conf
Listen on port 443 for incoming ssl connection
Forward link with sni=tgcd to port 2222
cat /etc/stunnel/stunnel_server.conf
[tls]
accept = 0.0.0.0:443
connect = 127.0.0.1:1080
[tgcd]
sni = tls:tgcd
connect = 127.0.0.1:2222
Corp Agent Server:
Launching tgcd daemon in CC mode:
tgcd -C -s 127.0.0.1:222 -c 127.0.0.227:2222
Connect to tgcd LL node at: 127.0.0.227:2222
Connect to sshd server at: 127.0.0.1:222
Launching stunnel in client mode:
/usr/local/bin/stunnel /etc/stunnel/stunnel_client.conf
Listen on port 127.0.0.227:2222 from tgcd CC, and
Access Home server via port 443 behind NAT and http proxy
cat /etc/stunnel/stunnel_client.conf
[ssh-tgcd-home]
accept = 127.0.0.227:2222
protocolHost = home.serverip:443
connect = http_proxy_ip:http_proxy_port
protocol = connect
sni = tgcd
******************************************
With such configuration, we can login into the corp server by means of:
ssh -p 22222 home.server.ip
Godaddy:
MX records:
| 0 | smtp.secureserver.net |
| 10 | mailstore1.secureserver.net |
| POP | pop.secureserver.net |
| IMAP | imap.secureserver.net |
| SMTP | smtpout.secureserver.net |
Port:
sudo apt-get install mailutils
sudo apt-get install postfix
sudo nano /etc/postfix/main.cf
echo "This is the body of the email" |
mail -s "This is the subject line" xxx@gmail.com
cat /etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: account@yourdomain
sudo nano /etc/postfix/sasl/passwd [smtpout.secureserver.net]:80 account@yourdomain:passwd
sudo postmap /etc/postfix/sasl/passwd
sudo nano /etc/postfix/main.cf
# specify SMTP relay host
relayhost = [smtpout.secureserver.net]:80
cat /etc/postfix/main.cf
smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
echo "email via godaddy smtp" |
mail -s "smtp relay" "From: account@yourdomain" xxx@dest
Add the line into /etc/postfix/main.cf
smtp_generic_maps = hash:/etc/postfix/generic
cat /etc/postfix/generic
other-email account@yourdomain
sudo postmap /etc/postfix/generic
eg:
vmkfstools -i “/vmfs/volumes/Datastore/examplevm/examplevm.vmdk” “/vmfs/volumes/Datastore2/newexamplevm/newexamplevm.vmdk” -d thin -a buslogic
Refer to
2016-10-27T12:50:47.496Z cpu7:32798)ScsiDeviceIO: 2651: Cmd(0x439d80358400) 0x1a, CmdSN 0x1d1f2 from world 0 to dev “mpx.vmhba33:C0:T0:L0” failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x5 0x24 0x0.
Host Status = 0x0 = OK
Device Status = 0x2 = Check Condition
Plugin Status = 0x0 = OK
Login into the ESXi6 shell terminal, and execute the rdm.sh ( rdm ) to create the RDM map file
Launch vmware vshere client v5.5 to attach /detach the RDM disk, the existed disk to VM
Launch vmware web client to delete the RDM disk map file
http://blog.zhenglei.net/?p=255651
http://blog.zhenglei.net/?p=255653
NAA stands for Network Addressing Authority identifier. EUI stands for Extended Unique Identifier. The number is guaranteed to be unique to that LUN. The NAA or EUI identifier is the preferred method of identifying LUNs and the number is generated by the storage device. Since the NAA or EUI is unique to the LUN, if the LUN is presented the same way across all ESXi hosts, the NAA or EUI identifier remains the same. For more information on these standards, see the SPC-3 documentation from the InterNational Committee for Information Technology Standards (T10).
The <Partition> represents the partition number on the LUN or Disk. If the <Partition> is specified as 0, it identifies the entire disk instead of only one partition. This identifier is generally used for operations with utilities such as vmkfstools.
mpx.vmhba<Adapter>:C<Channel>:T<Target>:L<LUN> or mpx.vmhba<Adapter>:C<Channel>:T<Target>:L<LUN>:<Partition>
Some devices do not provide the NAA number described above. In these circumstances, an MPX Identifier is generated by ESXi to represent the LUN or disk. The identifier takes the form similar to that of the canonical name of previous versions of ESXi with the mpx. prefix. This identifier can be used in the exact same way as the NAA Identifier described above.
/vmfs/devices/disks for local or SAN-based disks.
/vmfs/devices/lvm for ESXi logical volumes.
/vmfs/devices/generic for generic SCSI devices.
# vmkfstools -z /vmfs/devices/disks/t10.F405E46494C4540046F455B64787D285941707D203F45765 /vmfs/volumes/Datastore2/localrdm1/localrdm1.vmdk
Note: The size of the newly created RDM pointer file appears to be the same size and the Raw Device it it mapped to, this is a dummy file and is not consuming any storage space.