因今年东莞市发生多起安全事故:
- 2018年4月12日11时许,高埗三联村一钢筋结构构筑物发生坍塌,造成1死1伤,4人被困。
- 2018年5月26日上午9时30分许,大岭山大沙村的东莞市华业鞋材有限公司发生一起有限空间气体中毒事故,造成4人死亡。
- 2018年5月26日晚上8时许,塘厦镇发生一起溺水事故,造成2人死亡。
- 2018年5月27日凌晨6时许,樟木头镇发生一起交通事故,造成2人死亡。
因此夏季安全形式严峻,东莞市领导会赴镇街督导安全生产大排查。
Best practice to manage Information Technology System in Factory and Manufacturing Environment
因今年东莞市发生多起安全事故:
因此夏季安全形式严峻,东莞市领导会赴镇街督导安全生产大排查。
Step 1. Download sia program from https://sia.tech/get-started
Step 2. Start the Sia-UI program, and wait for “synchronizing” done, which we may wait for one or two days, so you have better run it in a stable computer.
Step 3. Create a wallet, mark down the seek and passphrase, and unlock it.
Click on the Wallet tab on the left. You’ll see two options – “Create a new wallet” or “Load a wallet from a seed”. If this is your first time creating a wallet, you’ll select Create a new wallet. It is also recommended to check the box to Use custom passphrase first, and create a password for your wallet. If you don’t, your wallet password will be the same as your wallet seed, which is not ideal, especially if you plan on hosting.
The wallet will say it’s scanning the blockchain, which may take several minutes. Wait for it to complete, or go grab a snack.
Step 4. Create a wallet address
A receiving address will be automatically generated for you in the top box, and you can give it a name in the bottom box if you want. Click Save to add it to the list of “Prior Addresses”. You can create as many addresses as you want, and they’ll all point to your wallet. Sia makes a new wallet address by default every time you click “Receive Siacoin” in order to help protect your privacy, but you can use any of your previous addresses at any time and they’ll still work.
Step 5. Backup your sia wallet
There is no option to backup the wallet in the sia-ui software! But you can backup the files by yourself!The files location is configured in the config.json file. The config.json is located in “Sia-UI-v1.2.0-win32-x64resourcesapp” folder. Open the file with text editor,you can see the “datadir” item.This item describe the backup files location! in the default the files location is in the C:userusernameAppDataRoamingSia-UI! Please do not go at manually backing up files from the Sia-UI folder as these are not guarenteed to work if placed back in a newer version of Sia-UI, above method is documented and always will work.
All you need to recover your wallet is to write down on a physical paper your seed, which is the same as your wallet password.
Step 6. Register account from antpool.com, and then select siacoin in the top right hand corner.
And then create account, sub-account, and worker as below:
Step 7. Setup in mining machine as below:
Change from original default setting below:
To:
Step 8: Once you’ve started mining, you can check your stats from miner status as below example:
Step 9. My earning monitor screen from antpool as below:
Error The procedure entry point ucrtbase.terminate could not be located in the dynamic link library api-ms-win-crt-runtime-l1-1-0.dll or The program can’t start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem. is usually caused by corrupt or outdated Visual C++ Redist where another program has overwritten the libraries, or the program you are trying to run requires a newer version of the Visual C++. The latest one is 2017. The second most common for this issue to occur is when Windows Updates are outdated or the KB2999226 (Universal CRT) has failed. You cannot install Microsoft Visual C++ 2015 redist (runtime) unless you have Windows Update KB2999226 installed (at least on Windows 7 64-bit SP1).
Download and run Reimage Plus to scan and restore corrupt and missing files from here, and then see if the issue is fixed if not then try the other methods listed below.
The one we are looking for through Windows Update is the Universal CRT Update KB2999226 which can also be downloaded and installed as a stand alone package from (here).
If the issue is still not resolved on Windows 7 after running the updates and install the KB2999226 manually, then follow these steps:
Then run the Windows Update again, reboot multiple times and check to make sure that all the updates are installed.
Modified on: Fri, 23 Jun, 2017 at 11:18 AM
When opening EasyWorship the following error appears “the procedure entry point ucrtbase.terminate could not be located in the dynamic link library api-ms-win-crt-runtime-l1-1-0.dll”.
This is a problem with a Windows library that is missing or corrupted. In many cases this can be fixed by installing the “Update for Universal C Runtime in Windows“.
$ pip install pyexcel pyexcel-xls pyexcel-xlsx
Run Python Script as:
import pyexcel as p
p.save_book_as(file_name='your-file-in.xls',
dest_file_name='your-new-file-out.xlsx')
If you do not need a program, you could install one additinal package pyexcel-cli::
$ pip install pyexcel-cli
$ pyexcel transcode your-file-in.xls your-new-file-out.xlsx
The transcoding procedure above uses xlrd and openpyxl.
import win32com.client as win32
fname = "full+path+to+xls_file"
excel = win32.gencache.EnsureDispatch('Excel.Application')
wb = excel.Workbooks.Open(fname)
wb.SaveAs(fname+"x", FileFormat = 51) #FileFormat = 51 is for .xlsx extension
wb.Close() #FileFormat = 56 is for .xls extension
excel.Application.Quit()
3. Compile via py2exe
py2exe extends Distutils with a new “command”. If you’ve installed third party Python modules then there’s a good chance you’ve seen at least one distutils command:
C:Tutorial>python setup.py install
“install” is a Distutils command that installs something (typically a Python module or package). The details Distutils needs to do that installation are contained in setup.py (and sometimes other associated files).
“py2exe” is a new Distutils command that is added when you import py2exe. To use py2exe you need to create a setup.py file to tell Distutils and py2exe what you want to do. Here’s a setup.py whose simplicity is appropriate for our sample program…
The next step is to run your setup script. Make sure to give the py2exe command and expect to see lots and lots of output:
C:Tutorial>python setup.py py2exe
Now that the package has been created it is ready to test:
C:Tutorial>cd dist C:Tutorialdist>hello.exe Hello World
[Anaconda3] C:Usersgoldmanau>pip install pyinstaller
[Anaconda3] C:Usersgoldmanau>pyinstaller --version
3.3.1
[Anaconda3] C:Usersgoldmanau>pyinstaller --onefile conv.py
418 INFO: PyInstaller: 3.3.1
418 INFO: Python: 3.5.1
418 INFO: Platform: Windows-7-6.1.7601-SP1
420 INFO: wrote C:Usersgoldmanauconv.spec
424 INFO: UPX is not available.
428 INFO: Extending PYTHONPATH with paths
['C:\Users\goldmanau', 'C:\Users\goldmanau']
428 INFO: checking Analysis
429 INFO: Building Analysis because out00-Analysis.toc is non existent
429 INFO: Initializing module dependency graph...
434 INFO: Initializing module graph hooks...
438 INFO: Analyzing base_library.zip ...
12259 INFO: running Analysis out00-Analysis.toc
14333 INFO: Caching module hooks...
14347 INFO: Analyzing C:Usersgoldmanauconv.py
14350 INFO: Processing pre-safe import module hook win32com
15341 INFO: Loading module hooks...
15342 INFO: Loading module hook "hook-pydoc.py"...
15343 INFO: Loading module hook "hook-pythoncom.py"...
15913 INFO: Loading module hook "hook-pywintypes.py"...
16460 INFO: Loading module hook "hook-win32com.py"...
16770 INFO: Loading module hook "hook-encodings.py"...
16970 INFO: Loading module hook "hook-xml.py"...
17803 INFO: Looking for ctypes DLLs
17879 INFO: Analyzing run-time hooks ...
17884 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
17897 INFO: Looking for dynamic libraries
19407 INFO: Looking for eggs
19407 INFO: Using Python library c:usersgoldmanauappdatalocalcontinuumanac
onda3python35.dll
19408 INFO: Found binding redirects:
[]
19415 INFO: Warnings written to C:Usersgoldmanaubuildconvwarnconv.txt
19520 INFO: Graph cross-reference written to C:Usersgoldmanaubuildconvxref-
conv.html
19587 INFO: checking PYZ
19587 INFO: Building PYZ because out00-PYZ.toc is non existent
19588 INFO: Building PYZ (ZlibArchive) C:Usersgoldmanaubuildconvout00-PYZ.p
yz
21378 INFO: Building PYZ (ZlibArchive) C:Usersgoldmanaubuildconvout00-PYZ.p
yz completed successfully.
21402 INFO: checking PKG
21403 INFO: Building PKG because out00-PKG.toc is non existent
21404 INFO: Building PKG (CArchive) out00-PKG.pkg
21752 INFO: Updating manifest in C:UsersgoldmanauAppDataRoamingpyinstaller
bincache00_py35_64bitpython35.dll
21753 INFO: Updating resource type 24 name 2 language 1033
27241 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
27253 INFO: Bootloader c:usersgoldmanauappdatalocalcontinuumanaconda3lib
site-packagesPyInstallerbootloaderWindows-64bitrun.exe
27254 INFO: checking EXE
27255 INFO: Building EXE because out00-EXE.toc is non existent
27256 INFO: Building EXE from out00-EXE.toc
27258 INFO: Appending archive to EXE C:Usersgoldmanaudistconv.exe
27345 INFO: Building EXE from out00-EXE.toc completed successfully.
Compile program in
C:Usersgoldmanaudistconv.exe
TinyWebDB is an App Inventor component that allows you to store data persistently in a database on the web. Because the data is stored on the web instead of a particular phone, TinyWebDB can be used to facilitate communication between phones and apps (e.g., multi-player games).
By default, the TinyWebDB component stores data on a test service provided by App Inventor, http://appinvtinywebdb.appspot.com/ . This service is helpful for testing, but it is shared by all App Inventor users, and it has a limit of 1000 entries. If you use it, your data will be overwritten eventually.
For most apps you write, you’ll want to create a custom web service that isn’t shared with other App Inventor apps and programmers. You need not be a programmer to do so– just follow the instructions below and you’ll have your own service within minutes.
To create your own web service, follow these instructions:
Congrats, you’ve now made a webpage for your app. But your app is not yet on the web, and thus not yet accessible to an App Inventor app. To get it there, you need to upload it to Google’s App Engine servers.
Your App Inventor apps can store and retrieve data using your new service. Just do the following:
Information source: 1) http://appinventor.mit.edu/explore/content/custom-tinywebdb-service.html
2) https://cloud.google.com/appengine/docs/standard/python/download?hl=zh-CN
Source: http://www.o769.cn/baixing/Info.asp?ID=7129
民以食为天,食品安全问题总是牵动大众的神经。记者7日从东莞市食药监局获悉,目前越来越多餐饮服务单位主动把后厨“亮”给市民看,全市实施“明厨亮灶”的餐饮单位数已达11899家,覆盖全市餐饮单位逾三分之一。
“明厨亮灶”分六种类别
不少餐馆的后厨门口都贴着“厨房重地,闲人免进”的提示,厨房的卫生状况和食品加工过程并不透明。“谁知道后厨到底卫不卫生呢?所以有时外出吃饭难免会提心吊胆。”很多市民担心。
“为了创新监管模式,强化餐饮服务单位的责任意识,早在2013年,我局就在部分中小学校、幼儿园食堂等餐饮单位率先试点开展‘明厨亮灶’工作。”据市食药监局相关负责人介绍,“明厨亮灶”就是将餐饮服务单位的操作间、凉菜间、洗消间等食品加工制作的关键部位和原料清洗、切配、烹饪、餐具洗消、凉菜加工等重要环节,通过透明玻璃窗(或玻璃幕墙)、电子显示屏、隔断矮墙等方式展示给消费者,实现阳光操作、透明化管理。
据了解,广东省去年也已出台了“明厨亮灶”规范指引——按照新修订的《广东省食品安全条例》第三十二条有关规定,将餐饮“明厨亮灶”建设分为透明式、开放式、视频监控式、参观通道式、组合式、其他形式等六种类别,并结合建设“餐饮服务食品安全信息公示栏”,向消费者展示食品加工制作关键过程,接受消费者监督。
用餐不再“眼不见为净”
昨日中午,记者走进厚街万达广场发现,作为厚街食品安全示范创建对象,这里已经实现“明厨亮灶”工程全覆盖。45家餐饮服务企业,均通过视频监控或透明式厨房等方式,让用餐顾客能看到厨房内部的操作。放眼望去,很多家餐厅在门口挂出了他们的监控电视,上面播放着厨房的实时画面。
记者在一家顺德菜餐厅看到,门口的监控电视中,两个画面对准了原料清洗和切配区域,另有两个画面显示着角落与地面的状况,看起来都比较整洁。餐厅里面还有一个监控电视,这样一来,顾客在选择餐厅前和用餐过程中,都能看到厨房内部的实时情况。
带着全家老小一同用餐的顾女士说:“以前外出吃饭都看不到这些后台操作,‘眼不见为净’。现在食客能直观地看到后面的卫生状况,的确会更放心,但是我们只能看到后厨的卫生情况和厨师的操作过程,食物的用料和材质看不到,希望接下来餐饮单位能公示原材料和辅料来源。”
“食药监部门已经叫我们去开过会,对此事我既支持又担心。”南城一家餐馆的负责人认为,一是会增加企业成本,二是担心泄露一些大厨的炒菜秘方,让竞争对手钻了空子。“如果同行都‘明厨亮灶’,而我们不这样做,那竞争力就弱了很多。所以现在正在考虑,究竟要怎么改。”
学校食堂过半“明厨亮灶”
据市食药监局相关负责人透露,东莞将坚持按照“企业自愿、行业自发、政府引导、主动参与、因地制宜”的工作思路,确定一些新开办基础设施好的餐饮单位、学校食堂、大型以上餐馆及其他高风险类餐饮服务单位作为“明厨亮灶”建设的重点,以点带面,逐步推行,力争用三年时间基本完成全市餐饮服务单位“明厨亮灶”工作目标。
“目前全市已经实施‘明厨亮灶’的餐饮单位数达11899家,其中学校食堂达927家,占学校食堂总数一半以上。”该负责人表示,东莞会严把许可准入,对新开办餐饮服务单位,引导按“明厨亮灶”工程的要求指导建设;对所有餐饮服务单位换发证时,强调“明厨亮灶”作为必要条件重新进行现场核查,建成开放式厨房、使用透明玻璃隔断、采用视频传输等技术。
东莞实施“明厨亮灶”的方案:
“明厨亮灶”实施方案一是用玻璃隔断展现,实现透明厨房 通过玻璃窗口消费者可以看到餐厅后厨师傅做菜的烹饪过程!这也是明厨亮灶最早的展现方式!同时跟据食品安全信息公示牌让监控管理人员和食客及时了解到食品的采购信息。
“明厨亮灶”实施方案二是通过后厨安装高清远程监控摄像设备实时直播将厨房生态——食材选择、烹饪加工、剩菜处理、餐具消毒等所有环节,以及厨房卫生情况、厨师仪表穿着等,一一呈现给食客,保障其知情权与监督权,让他们吃得更放心、吃得更安全。
“明厨亮灶”实施方案三是通过后厨安装高清远程监控摄像设备实时直播将厨房生态——食材选择、烹饪加工、剩菜处理、餐具消毒等所有环节,以及厨房卫生情况、厨师仪表穿着等,一一呈现给食客,保障其知情权与监督权,让他们吃得更放心、吃得更安全。
“明厨亮灶”实施方案四是实现了第三的所有功能还增加了从食品食材种植环境,食材储存、厨房环境、配菜烹调加工等过程就实现了全程透明化,实时性、公开性、透明性的阳光透明厨房,让消费者更放心!
information source: https://support.bitmain.com/hc/en-us/articles/115000211774-Connect-Antminer-S9-T9-S7-to-Pools-Antpool-BTC-com
Connect to Antpool
1.Login:https://www.antpool.com/
2. Enter your User ID and password for Bitmain.com to log into Antpool or register a new account.
3. Click the “Bitcoin”at the upper left of the page. Go to the Settings tab and add a Sub-Account via the button on the right.
Sub-account must contain only the letters or numbers
4. Enter the default IP address of the ANTMINER – Go to the login page, enter the user ID: root, password: root.
5. Click Miner Configuration, you can fill in 3 groups of mining pool. If the first group is dead, then, it will automatically pointed to the second group. You could fill first 2 groups with Antpool, the third one with BTC.com.
Below is the configuration of Antpool:
stratum+tcp://stratum.antpool.com:3333
stratum+tcp://stratum.antpool.com:443
stratum+tcp://stratum.antpool.com:25
Worker Format: sub-account.miner name
Example: If your sub-account is “antminer”, then your miners could be set up as antminer.1, antminer_1, antminer.2, etc. The miner order will be sorted by the miner name.
Password: (Blank). if you change addresses in bulk, fill it as 123.
Click Save & Apply to mine, the miners will be restart.
Connect to BTC.com
1. Login the home page: https://pool.btc.com
2. Click the “Sign Up Now ” button:
3. Complete the informtaion required and create a new account:
1. Click the user name on the top right and choose create sub-account:
2. Fill the blanks and complete creating sub-account:
1. Node Selection
There is network delay when users connecting miners to different nodes in different area. Selecting the nearest nodes can provide the most stable connection.
North China Mining Address
stratum+tcp://cn.ss.btc.com:1800
stratum+tcp://cn.ss.btc.com:443
stratum+tcp://cn.ss.btc.com:25
South China Mining Address
stratum+tcp://us.ss.btc.com:1800
stratum+tcp://us.ss.btc.com:443
stratum+tcp://us.ss.btc.com:25
America Mining Address
stratum+tcp://us.ss.btc.com:1800
stratum+tcp://us.ss.btc.com:443
stratum+tcp://us.ss.btc.com:25
Europe Mining Address
stratum+tcp://us.ss.btc.com:1800
stratum+tcp://us.ss.btc.com:443
stratum+tcp://us.ss.btc.com:25
2. Miner Setting
Format: sub-account.miner name
Example: If your sub-account is “btcminer”, then your miners could be set up as btcminer.001, btcminer.002, etc. The miner order will be sorted by the miner name. Password: (Blank). if you change addresses in bulk, fill it as 123.
3. Miner Conection Setting
Type the IP address of miners into the address bar with a web browser under the local area network. The default account is: username ‘root’, password ‘root’.
1. After signing up on BTC pool, uses can establish multiple sub-accounts for different needs.
Click the current sub-account on top right corner:
2. Users can edit every sub-account on this page, such as modifying address and setting alert:
Click “settings” button on top right of the website, you can modify your account and address as follows:
Payment Time
BTC Pool settles all the earnings of last day at UTC 00:00 and sends the payment in 2 hours.
Confirmation Time
The confirmation of TX takes time on Bitcoin Network. The time could be 1 minute or up to 2 hours, which depends on the network status. BTC Pool promises that users receive the payment in the shortest time.
Quality and grade is difference. Quality as a delivered performance or result is “the degree to which a set of inherent characteristics fulfill requirements” (ISO 9000). Grade as a design intent is a category assigned to deliverables having the same functional use but different technical characteristics. While a quality level that fails to meet quality requirements is always a problem, a low grade of quality may not be a problem. For example:
The project management team should determine the appropriate levels of accuracy and precision for use in the quality management plan. Precision is a measure of exactness. Accuracy is an assessment of correctness. For example, if the measured value of an item is very close to the true value of the characteristic being meansured. the measurement is more accurate. An illustration of this concept is the comparison of archery targets. Arrows clustered tightly in one area of the target, even if they are not clustered in the bull’s eye, are considered to have high precision. Targets where the arrows are more spread out but equidistant from the bull’s eye are considered to have the same degree of accuracy. Targets were the arrows are both tightly grouped and within the bull’s eye are considered to be both accurate and precise. Precise measurements are not necessary accurate measurements, are accurate measurements are not necessarily precise measurements.
Example of using a free-of-charge “Excel CMS” plugin to display an excel file in wordpress as below. If you want to get more info about this “Excel CMS” plugin, please visit their website.
[wp_excel_cms name=”Sales Commission”]
Source: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html
By default, instances that you launch into a virtual private cloud (VPC) can’t communicate with your own network. You can enable access to your network from your VPC by attaching a virtual private gateway to the VPC, creating a custom route table, updating your security group rules, and creating an AWS managed VPN connection.
Although the term VPN connection is a general term, in the Amazon VPC documentation, a VPN connection refers to the connection between your VPC and your own network. AWS supports Internet Protocol security (IPsec) VPN connections.
Your AWS managed VPN connection is either an AWS Classic VPN or an AWS VPN. For more information, see AWS Managed VPN Categories.
Important
We currently do not support IPv6 traffic through a VPN connection.
Topics
For information about how you’re charged for using a VPN connection with your VPC, see the Amazon VPC product page.
A VPN connection consists of the following components. For more information about VPN limits, see Amazon VPC Limits.
A virtual private gateway is the VPN concentrator on the Amazon side of the VPN connection. You create a virtual private gateway and attach it to the VPC from which you want to create the VPN connection.
When you create a virtual private gateway, you can specify the private Autonomous System Number (ASN) for the Amazon side of the gateway. If you don’t specify an ASN, the virtual private gateway is created with the default ASN (64512). You cannot change the ASN after you’ve created the virtual private gateway. To check the ASN for your virtual private gateway, view its details in the Virtual Private Gateways screen in the Amazon VPC console, or use the describe-vpn-gateways AWS CLI command.
Note
If you create your virtual private gateway before 2018-06-30, the default ASN is 17493 in the Asia Pacific (Singapore) region, 10124 in the Asia Pacific (Tokyo) region, 9059 in the EU (Ireland) region, and 7224 in all other regions.
A customer gateway is a physical device or software application on your side of the VPN connection.
To create a VPN connection, you must create a customer gateway resource in AWS, which provides information to AWS about your customer gateway device. The following table describes the information you’ll need to create a customer gateway resource.
Item | Description |
---|---|
Internet-routable IP address (static) of the customer gateway’s external interface. | The public IP address value must be static. If your customer gateway is behind a network address translation (NAT) device that’s enabled for NAT traversal (NAT-T), use the public IP address of your NAT device, and adjust your firewall rules to unblock UDP port 4500. |
The type of routing—static or dynamic. | For more information, see VPN Routing Options. |
(Dynamic routing only) Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the customer gateway. | You can use an existing ASN assigned to your network. If you don’t have one, you can use a private ASN (in the 64512–65534 range).If you use the VPC wizard in the console to set up your VPC, we automatically use 65000 as the ASN. |
To use Amazon VPC with a VPN connection, you or your network administrator must also configure the customer gateway device or application. When you create the VPN connection, we provide you with the required configuration information and your network administrator typically performs this configuration. For information about the customer gateway requirements and configuration, see the Your Customer Gateway in the Amazon VPC Network Administrator Guide.
The VPN tunnel comes up when traffic is generated from your side of the VPN connection. The virtual private gateway is not the initiator; your customer gateway must initiate the tunnels. If your VPN connection experiences a period of idle time (usually 10 seconds, depending on your configuration), the tunnel may go down. To prevent this, you can use a network monitoring tool to generate keepalive pings; for example, by using IP SLA.
For a list of customer gateways that we have tested with Amazon VPC, see Amazon Virtual Private Cloud FAQs.
Your AWS managed VPN connection is either an AWS Classic VPN connection or an AWS VPN connection. Any new VPN connection that you create is an AWS VPN connection. The following features are supported on AWS VPN connections only:
You can find out the category of your AWS managed VPN connection by using the Amazon VPC console or a command line tool.
To identify the VPN category using the console
VPN
indicates an AWS VPN connection. A value of VPN-Classic
indicates an AWS Classic VPN connection.To identify the VPN category using a command line tool
Category
value. A value of VPN
indicates an AWS VPN connection. A value of VPN-Classic
indicates an AWS Classic VPN connection.In the following example, the VPN connection is an AWS VPN connection.
aws ec2 describe-vpn-connections --vpn-connection-ids vpn-1a2b3c4d
{
"VpnConnections": [
{
"VpnConnectionId": "vpn-1a2b3c4d",
...
"State": "available",
"VpnGatewayId": "vgw-11aa22bb",
"CustomerGatewayId": "cgw-ab12cd34",
"Type": "ipsec.1",
"Category": "VPN"
}
]
}
Alternatively, use one of the following commands:
If your existing VPN connection is an AWS Classic VPN connection, you can migrate to an AWS VPN connection by creating a new virtual private gateway and VPN connection, detaching the old virtual private gateway from your VPC, and attaching the new virtual private gateway to your VPC.
If your existing virtual private gateway is associated with multiple VPN connections, you must recreate each VPN connection for the new virtual private gateway. If there are multiple AWS Direct Connect private virtual interfaces attached to your virtual private gateway, you must recreate each private virtual interface for the new virtual private gateway. For more information, see Creating a Virtual Interface in the AWS Direct Connect User Guide.
If your existing AWS managed VPN connection is an AWS VPN connection, you cannot migrate to an AWS Classic VPN connection.
Note
During this procedure, connectivity over the current VPC connection is interrupted when you disable route propagation and detach the old virtual private gateway from your VPC. Connectivity is restored when the new virtual private gateway is attached to your VPC and the new VPN connection is active. Ensure that you plan for the expected downtime.
To migrate to an AWS VPN connection
Note
From this step onwards, connectivity is interrupted until the new virtual private gateway is attached and the new VPN connection is active.
UP
.
Note
If you need to revert to your previous configuration, detach the new virtual private gateway and follow steps 8 and 9 to re-attach the old virtual private gateway and update your routes.
Important
After you’ve deleted the AWS Classic VPN connection, you cannot revert or migrate your new AWS VPN connection back to an AWS Classic VPN connection.
The following diagrams illustrate single and multiple VPN connections. The VPC has an attached virtual private gateway, and your network includes a customer gateway, which you must configure to enable the VPN connection. You set up the routing so that any traffic from the VPC bound for your network is routed to the virtual private gateway.
When you create multiple VPN connections to a single VPC, you can configure a second customer gateway to create a redundant connection to the same external location. You can also use it to create VPN connections to multiple geographic locations.
When you create a VPN connection, you must do the following:
The type of routing that you select can depend on the make and model of your VPN devices. If your VPN device supports Border Gateway Protocol (BGP), specify dynamic routing when you configure your VPN connection. If your device does not support BGP, specify static routing. For a list of static and dynamic routing devices that have been tested with Amazon VPC, see the Amazon Virtual Private Cloud FAQs.
When you use a BGP device, you don’t need to specify static routes to the VPN connection because the device uses BGP to advertise its routes to the virtual private gateway. If you use a device that doesn’t support BGP, you must select static routing and enter the routes (IP prefixes) for your network that should be communicated to the virtual private gateway.
We recommend that you use BGP-capable devices, when available, because the BGP protocol offers robust liveness detection checks that can assist failover to the second VPN tunnel if the first tunnel goes down. Devices that don’t support BGP may also perform health checks to assist failover to the second tunnel when needed.
Route tables determine where network traffic is directed. In your route table, you must add a route for your network and specify the virtual private gateway as the target. This enables traffic destined for your network to route via the virtual private gateway and over one of the VPN tunnels. You can enable route propagation for your route table to automatically propagate your network routes to the table for you.
Only IP prefixes that are known to the virtual private gateway, whether through BGP advertisements or static route entry, can receive traffic from your VPC. The virtual private gateway does not route any other traffic destined outside of received BGP advertisements, static route entries, or its attached VPC CIDR.
When a virtual private gateway receives routing information, it uses path selection to determine how to route traffic to your network. Longest prefix match applies; otherwise, the following rules apply:
If you have overlapping routes within a VPN connection and longest prefix match cannot be applied, then we prioritize the routes as follows in the VPN connection, from most preferred to least preferred:
In this example, your route table has a static route to an internet gateway (that you added manually), and a propagated route to a virtual private gateway. Both routes have a destination of 172.31.0.0/24
. In this case, all traffic destined for 172.31.0.0/24
is routed to the internet gateway — it is a static route and therefore takes priority over the propagated route.
Destination | Target |
---|---|
10.0.0.0/16 | Local |
172.31.0.0/24 | vgw-1a2b3c4d (propagated) |
172.31.0.0/24 | igw-11aa22bb |
You use a VPN connection to connect your network to a VPC. Each VPN connection has two tunnels, with each tunnel using a unique virtual private gateway public IP address. It is important to configure both tunnels for redundancy. When one tunnel becomes unavailable (for example, down for maintenance), network traffic is automatically routed to the available tunnel for that specific VPN connection.
The following diagram shows the two tunnels of the VPN connection.
When you create a VPN connection, you download a configuration file specific to your customer gateway device that contains information for configuring the device, including information for configuring each tunnel. You can optionally specify some of the tunnel options yourself when you create the VPN connection. Otherwise, AWS provides default values.
The following table describes the tunnel options that you can configure.
Item | Description | AWS-provided default value |
---|---|---|
Inside tunnel CIDR | The range of inside IP addresses for the VPN tunnel. You can specify a size /30 CIDR block from the 169.254.0.0/16 range. The CIDR block must be unique across all VPN connections that use the same virtual private gateway.The following CIDR blocks are reserved and cannot be used:
|
A size /30 CIDR block from the 169.254.0.0/16 range. |
Pre-shared key (PSK) | The pre-shared key (PSK) to establish the initial IKE Security Association between the virtual private gateway and customer gateway.The PSK must be between 8 and 64 characters in length and cannot start with zero (0). Allowed characters are alphanumeric characters, periods (.), and underscores (_). | A 32-character alphanumeric string. |
You cannot modify tunnel options after you create the VPN connection. To change the inside tunnel IP addresses or the PSKs for an existing connection, you must delete the VPN connection and create a new one. You cannot configure tunnel options for an AWS Classic VPN connection.
As described earlier, a VPN connection has two tunnels to help ensure connectivity in case one of the VPN connections becomes unavailable. To protect against a loss of connectivity in case your customer gateway becomes unavailable, you can set up a second VPN connection to your VPC and virtual private gateway by using a second customer gateway. By using redundant VPN connections and customer gateways, you can perform maintenance on one of your customer gateways while traffic continues to flow over the second customer gateway’s VPN connection. To establish redundant VPN connections and customer gateways on your network, you need to set up a second VPN connection. The customer gateway IP address for the second VPN connection must be publicly accessible.
The following diagram shows the two tunnels of each VPN connection and two customer gateways.
Dynamically routed VPN connections use the Border Gateway Protocol (BGP) to exchange routing information between your customer gateways and the virtual private gateways. Statically routed VPN connections require you to enter static routes for the network on your side of the customer gateway. BGP-advertised and statically entered route information allow gateways on both sides to determine which tunnels are available and reroute traffic if a failure occurs. We recommend that you configure your network to use the routing information provided by BGP (if available) to select an available path. The exact configuration depends on the architecture of your network.
Source: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/SetUpVPNConnections.html
Use the following procedures to manually set up the VPN connection. Alternatively, you can let the VPC creation wizard take care of many of these steps for you. For more information about using the VPC creation wizard to set up the virtual private gateway, see Scenario 3: VPC with Public and Private Subnets and AWS Managed VPN Access or Scenario 4: VPC with a Private Subnet Only and AWS Managed VPN Access.
To set up a VPN connection, you need to complete the following steps:
These procedures assume that you have a VPC with one or more subnets.
A customer gateway provides information to AWS about your customer gateway device or software application. For more information, see Customer Gateway.
To create a customer gateway using the console
Name
and the value that you specify.To create a customer gateway using the command line or API
When you create a virtual private gateway, you can optionally specify the private Autonomous System Number (ASN) for the Amazon side of the gateway. The ASN must be different from the BGP ASN specified for the customer gateway.
After you create a virtual private gateway, you must attach it to your VPC.
To create a virtual private gateway and attach it to your VPC
Name
and the value that you specify.To create a virtual private gateway using the command line or API
To attach a virtual private gateway to a VPC using the command line or API
To enable instances in your VPC to reach your customer gateway, you must configure your route table to include the routes used by your VPN connection and point them to your virtual private gateway. You can enable route propagation for your route table to automatically propagate those routes to the table for you.
For static routing, the static IP prefixes that you specify for your VPN configuration are propagated to the route table when the status of the VPN connection is UP
. Similarly, for dynamic routing, the BGP-advertised routes from your customer gateway are propagated to the route table when the status of the VPN connection is UP
.
Note
If your connection is interrupted, any propagated routes in your route table are not automatically removed. You may have to disable route propagation to remove the propagated routes; for example, if you want traffic to fail over to a static route.
To enable route propagation using the console
Note
For static routing, if you do not enable route propagation, you must manually enter the static routes used by your VPN connection. To do this, select your route table, choose Routes, Edit. For Destination, add the static route used by your VPN connection . For Target, select the virtual private gateway ID, and choose Save.
To disable route propagation using the console
To enable route propagation using the command line or API
To disable route propagation using the command line or API
To allow access to instances in your VPC from your network, you must update your security group rules to enable inbound SSH, RDP, and ICMP access.
To add rules to your security group to enable inbound SSH, RDP and ICMP access
For more information about working with security groups using the AWS CLI, see Security Groups for Your VPC.
After you create the VPN connection, download the configuration information and use it to configure the customer gateway device or software application.
To create a VPN connection and configure the customer gateway
Name
and the value that you specify.169.254.0.0/16
range for the inside tunnel IP addresses.For more information about these options, see Configuring the VPN Tunnels for Your VPN Connection.
It may take a few minutes to create the VPN connection. When it’s ready, select the connection and choose Download Configuration.
To create a VPN connection using the command line or API
For static routing, you can add, modify, or remove the static routes for your VPN configuration.
To add, modify, or remove a static route
Note
If you have not enabled route propagation for your route table, you must manually update the routes in your route table to reflect the updated static IP prefixes in your VPN connection. For more information, see Enable Route Propagation in Your Route Table.
To add a static route using the command line or API
To delete a static route using the command line or API
If you believe that the tunnel credentials for your VPN connection have been compromised, you can change the IKE pre-shared key. To do so, delete the VPN connection, create a new one using the same virtual private gateway, and configure the new keys on your customer gateway. You can specify your own pre-shared keys when you create the VPN connection. You also need to confirm that the tunnel’s inside and outside addresses match, because these might change when you recreate the VPN connection. While you perform the procedure, communication with your instances in the VPC stops, but the instances continue to run uninterrupted. After the network administrator implements the new configuration information, your VPN connection uses the new credentials, and the network connection to your instances in the VPC resumes.
Important
This procedure requires assistance from your network administrator group.
To change the IKE pre-shared key
Source: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario4.html
The configuration for this scenario includes a virtual private cloud (VPC) with a single private subnet, and a virtual private gateway to enable communication with your own network over an IPsec VPN tunnel. There is no Internet gateway to enable communication over the Internet. We recommend this scenario if you want to extend your network into the cloud using Amazon’s infrastructure without exposing your network to the Internet.
This topic assumes that you’ll use the VPC wizard in the Amazon VPC console to create the VPC and the VPN connection.
This scenario can also be optionally configured for IPv6—you can use the VPC wizard to create a VPC and subnet with associated IPv6 CIDR blocks. Instances launched into the subnet can receive IPv6 addresses. Currently, we do not support IPv6 communication over a VPN connection; however, instances in the VPC can communicate with each other via IPv6. For more information about IPv4 and IPv6 addressing, see IP Addressing in Your VPC.
The following diagram shows the key components of the configuration for this scenario.
Important
For this scenario, the Amazon VPC Network Administrator Guide describes what your network administrator needs to do to configure the Amazon VPC customer gateway on your side of the VPN connection.
The configuration for this scenario includes the following:
For more information about subnets, see VPCs and Subnets and IP Addressing in Your VPC. For more information about your VPN connection, see AWS Managed VPN Connections. For more information about configuring a customer gateway, see the Amazon VPC Network Administrator Guide.
You can optionally enable IPv6 for this scenario. In addition to the components listed above, the configuration includes the following:
Your VPC has an implied router (shown in the configuration diagram for this scenario). In this scenario, the VPC wizard creates a route table that routes all traffic destined for an address outside the VPC to the VPN connection, and associates the route table with the subnet.
The following describes the route table for this scenario. The first entry is the default entry for local routing in the VPC; this entry enables the instances in this VPC to communicate with each other. The second entry routes all other subnet traffic to the virtual private gateway (for example, vgw-1a2b3c4d
).
Destination | Target |
---|---|
10.0.0.0/16 | local |
0.0.0.0/0 | vgw-id |
The VPN connection is configured either as a statically-routed VPN connection or as a dynamically routed VPN connection (using BGP). If you select static routing, you’ll be prompted to manually enter the IP prefix for your network when you create the VPN connection. If you select dynamic routing, the IP prefix is advertised automatically to your VPC through BGP.
The instances in your VPC can’t reach the Internet directly; any Internet-bound traffic must first traverse the virtual private gateway to your network, where the traffic is then subject to your firewall and corporate security policies. If the instances send any AWS-bound traffic (for example, requests to Amazon S3 or Amazon EC2), the requests must go over the virtual private gateway to your network and then to the Internet before reaching AWS. Currently, we do not support IPv6 for VPN connections.
If you associate an IPv6 CIDR block with your VPC and subnets, your route table includes separate routes for IPv6 traffic. The following describes the custom route table for this scenario. The second entry is the default route that’s automatically added for local routing in the VPC over IPv6.
Destination | Target |
---|---|
10.0.0.0/16 | local |
2001:db8:1234:1a00::/56 | local |
0.0.0.0/0 | vgw-id |
AWS provides two features that you can use to increase security in your VPC: security groups and network ACLs. Security groups control inbound and outbound traffic for your instances, and network ACLs control inbound and outbound traffic for your subnets. In most cases, security groups can meet your needs; however, you can also use network ACLs if you want an additional layer of security for your VPC. For more information, see Security.
For scenario 4, you’ll use the default security group for your VPC but not a network ACL. If you’d like to use a network ACL, see Recommended Rules for Scenario 4.
Your VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between the instances assigned to the security group. For this scenario, we recommend that you add inbound rules to the default security group to allow SSH traffic (Linux) and Remote Desktop traffic (Windows) from your network.
Important
The default security group automatically allows assigned instances to communicate with each other, so you don’t have to add a rule to allow this. If you use a different security group, you must add a rule to allow this.
The following table describes the inbound rules that you should add to the default security group for your VPC.
Default Security Group: Recommended Rules
Inbound | |||
Source | Protocol | Port Range | Comments |
Private IPv4 address range of your network | TCP | 22 | (Linux instances) Allow inbound SSH traffic from your network. |
Private IPv4 address range of your network | TCP | 3389 | (Windows instances) Allow inbound RDP traffic from your network. |
If you associate an IPv6 CIDR block with your VPC and subnets, you must add separate rules to your security group to control inbound and outbound IPv6 traffic for your instances. In this scenario, the database servers cannot be reached over the VPN connection using IPv6; therefore, no additional security group rules are required.
To implement scenario 4, get information about your customer gateway, and create the VPC using the VPC wizard, The VPC wizard creates a VPN connection for you with a customer gateway and virtual private gateway.
To prepare your customer gateway
Use the VPC wizard to create your VPC and a VPN connection.
To create a VPC using the VPC wizard
00
).For more information, see VPN Routing Options.
For this scenario, you need to update the default security group with new inbound rules that allow SSH and Remote Desktop (RDP) access from your network. If you don’t want instances to initiate outbound communication, you can also remove the default outbound rule.
To update the rules for the default security group
172.0.0.0/8
.After your network administrator configures your customer gateway, you can launch instances into your VPC. If you’re already familiar with launching instances outside a VPC, then you already know most of what you need to know to launch an instance into a VPC.
To launch an instance
Note
If you intend to use your instance for IPv6 communication, you must choose a supported instance type; for example, T2. For more information, see Amazon EC2 Instance Types.
In scenario 4, you need a DNS server that enables your VPN-only subnet to communicate with servers in your network. You must create a new set of DHCP options that includes your DNS server and then configure the VPC to use that set of options.
Note
Your VPC automatically has a set of DHCP options with domain-name-servers=AmazonProvidedDNS. This is a DNS server that Amazon provides to enable any public subnets in your VPC to communicate with the Internet over an Internet gateway. Scenario 4 doesn’t have any public subnets, so you don’t need this set of DHCP options.
To update the DHCP options
You can now use SSH or RDP to connect to your instance in the VPC. For information about how to connect to a Linux instance, see Connect to Your Linux Instance in the Amazon EC2 User Guide for Linux Instances. For information about how to connect to a Windows instance, see Connect to Your Windows Instance in the Amazon EC2 User Guide for Windows Instances.