md5sum (GNU coreutils) 8.23
я просто её использовал.$ curl -v --user "user@site.com:pass" https://site.com/
* Trying 1.1.1.1...
* Connected to site.com (1.1.1.1) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
...
* Server auth using Basic with user 'solomon@site.com'
> GET / HTTP/1.1
> Host: site.com
> Authorization: Basic dXNlckBzaXRlLmNvbTpwYXNz
> User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Mon, 23 Nov 2015 22:26:57 GMT
< Content-Type: text/html
< Content-Length: 590
< Connection: keep-alive
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="Site in developing"
* Authentication problem. Ignoring this. <----- проблема
< WWW-Authenticate: Basic realm="Site in developing" <----- проблема
<
<html>
#############################################
$ curl -v https://site.com/mail/
* Trying 1.1.1.1...
* Connected to site.com (1.1.1.1) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
...
> GET /mail/ HTTP/1.1
> Host: site.com
> User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Mon, 23 Nov 2015 22:33:47 GMT
< Content-Type: text/html
< Content-Length: 590
< Connection: keep-alive
< WWW-Authenticate: Basic realm="Corporate eMail"
< WWW-Authenticate: Basic realm="Corporate eMail" <----- проблема
<
<html>
...
mysql> desc titles;
+-----------------+----------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+----------------------+------+-----+---------------------+----------------+
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| title | varchar(255) | NO | | NULL | |
| type | varchar(15) | NO | | movie | |
...
| tmdb_id | bigint(20) unsigned | YES | MUL | NULL | |
...
| updated_at | timestamp | NO | | 0000-00-00 00:00:00 | |
...
| language | varchar(255) | YES | | NULL | |
| country | varchar(255) | YES | | NULL | |
...
+-----------------+----------------------+------+-----+---------------------+----------------+
38 rows in set (0.01 sec)
mysql> INSERT INTO titles
(title,language,country,updated_at,tmdb_id,type)
VALUES
('Teen Choice Awards', 'En', 'US', '2015-05-01 01:44:14', 43117,'series')
ON DUPLICATE KEY UPDATE
title = values(title),
language = values(language),
country = values(country),
updated_at = values(updated_at),
tmdb_id = values(tmdb_id),
type = values(type);
Query OK, 2 rows affected (0.01 sec)
# Generated by iptables-save v1.4.14 on Tue Apr 14 17:16:37 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
-A INPUT -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -d 192.168.80.1/32 -p tcp -m tcp --dport 8088 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-port-unreachable
-A OUTPUT -j ACCEPT
COMMIT
# Completed on Tue Apr 14 17:16:37 2015
# Generated by iptables-save v1.4.14 on Tue Apr 14 17:16:37 2015
*nat
:PREROUTING ACCEPT [43:7242]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [14:1060]
:POSTROUTING ACCEPT [14:1060]
-A PREROUTING -d 1.1.1.1/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.80.1:8088
-A POSTROUTING -d 192.168.80.1/32 -p tcp -m tcp --dport 8088 -j SNAT --to-source 192.168.80.130
COMMIT
# Completed on Tue Apr 14 17:16:37 2015
root@host:~# nc 1.1.1.1 80
GET /
<html><body><h1>1.1.1.1</h1></body></html>
root@host:~# iptables-save
# Generated by iptables-save v1.4.14 on Tue Apr 14 16:13:57 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
-A INPUT -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -s 1.1.1.1/32 -d 192.168.80.1/32 -p tcp -m tcp --dport 8088 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-port-unreachable
-A OUTPUT -j ACCEPT
COMMIT
# Completed on Tue Apr 14 16:13:57 2015
# Generated by iptables-save v1.4.14 on Tue Apr 14 16:13:57 2015
*nat
:PREROUTING ACCEPT [7:1288]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [8:464]
:POSTROUTING ACCEPT [8:464]
-A PREROUTING -s 1.1.1.1/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.80.1:8088
-A POSTROUTING -s 1.1.1.1/32 -d 192.168.80.1/32 -p tcp -m tcp --dport 8088 -j SNAT --to-source 192.168.80.130
COMMIT
# Completed on Tue Apr 14 16:13:57 2015