gateway

运维route语法

旧街凉风 提交于 2019-12-30 23:42:31
Linux系统的route命令用于显示和操作IP路由表(show / manipulate the IP routing table)。要实现两个不同的子网之间的通信,需要一台连接两个网络的路由器,或者同时位于两个网络的网关来实现。在Linux系统中,设置路由通常是为了解决以下问题:该Linux系统在一个局域网中,局域网中有一个网关,能够让机器访问Internet,那么就需要将这台机器的IP地址设置为Linux机器的默认路由。要注意的是,直接在命令行下执行route命令来添加路由,不会永久保存,当网卡重启或者机器重启之后,该路由就失效了;可以在/etc/rc.local中添加route命令来保证该路由设置永久有效。 1.命令格式: route [-f] [-p] [Command [Destination] [mask Netmask] [Gateway] [metric Metric]] [if Interface]] 2.命令功能: Route命令是用于操作基于内核ip路由表,它的主要作用是创建一个静态路由让指定一个主机或者一个网络通过一个网络接口,如eth0。当使用"add"或者"del"参数时,路由表被修改,如果没有参数,则显示路由表当前的内容。 3.命令参数: -c 显示更多信息 -n 不解析名字 -v 显示详细的处理信息 -F 显示发送信息 -C 显示路由缓存 -f

关于Ocelot和Consul 实现GateWay(网关) 服务注册 负载均衡等方面

孤者浪人 提交于 2019-12-29 01:38:16
Ocelot 路由 请求聚合 服务发现 认证 鉴权 限流熔断 内置负载均衡器 Consul 自动服务发现 健康检查 通过Ocelot搭建API网关 服务注册 负载均衡 1.创建三个空API项目 Api.Gateway(Ocelot网关服务器) Api.ServiceA(资源服务器A) Api.ServiceB(资源服务器B) 2.Api.Gateway项目中 添加Ocelot包 添加Ocelot.Json配置文件 Ocelot服务器端口配成5000 { "ReRoutes": [ { //暴露出去的地址 "UpstreamPathTemplate": "/api/{controller}", "UpstreamHttpMethod": [ "Get" ], //转发到下面这个地址 "DownstreamPathTemplate": "/api/{controller}", "DownstreamScheme": "http", //资源服务器列表 "DownstreamHostAndPorts": [ { "host": "localhost", "port": 5011 }, { "host": "localhost", "port": 5012 } ], //决定负载均衡的算法 "LoadBalancerOptions": { "Type": "LeastConnection"

网络虚拟化

徘徊边缘 提交于 2019-12-28 13:40:42
介绍 https://segmentfault.com/a/1190000004059167 在专业的网络世界中,经常使用到Virtual Routing and Forwarding(VRF),比如Cisco,Alcatel-Lucent, Juniper 等。对于L2 switch,自从上世纪90年代就开始使用VLAN,一个物理交换机上可以使用多个广播域,如今大多数交换机都支持4K vlan。 这个概念被引入到L3,如今很多网络设备支持VRF。这意味着,单个物理设备上可运行多个虚拟路由(L3 转发实例)。 在linux中,VRF被叫做“network namespace”。 每个network namespace拥有其对应的路由表(routing table)& 其对应的iptables,并且运行程序运行其中。 为什么有人使用它?比如一个运行在linux上的 Firewall,将firewall的所有服务端口分配给一个network namespace,这样,默认的network namespace 和 Firewall network namespace就运行着不同的路由表。像SSH这样的application运行在默认的network namespace,但是不在Firewall network namespace。 下面展示了其基本用法。 Basic network

CAS单点登陆的两个原理图

霸气de小男生 提交于 2019-12-27 08:20:44
最近学习CAS单点登录,所以在网上找了两张比较清晰的原理图以供参考: 【CAS浏览器请求认证序列图】 其中: * ST:Service Ticket,用于客户端应用持有,每个ST对应一个用户在一个客户端上 * TGT:Ticket Granting Ticket,存储在CAS服务器端和用户cookie两个地方 【CAS服务器端登陆流程图】 3.1.1. parameters 下面的 HTTP 请求的参数可通过 /login ,这时它作为凭证索取者。他们都是区分大小写的,他们都必须处理 /login 。 · service[ 可选 ] - 客户端尝试访问的应用的标识符。在几乎所有情况下,这将是应用的 URL 。请注意,作为一个 HTTP 请求的参数,此 URL 的值必须是符合 RFC 中 URL 编码的描述。(详情参见 RFC 1738 [ 4 ] 的第 2.2 节)。如果没有指定 service 并且单点登录 session 尚不存在, CAS 应要求具有凭证的用户发起一个单点登录 session 。如果没有指定 service 但单点登录 session 已经存在, CAS 应显示一条消息,通知客户,这是已经登录 · Renew[ 可选 ] - 如果此参数设置,单点登录将被绕过。在这种情况下, CAS 将要求客户提交证书,不论是否存在一个 CAS 的单点登录 session

微服务SpringCloud之服务网关zuul一

左心房为你撑大大i 提交于 2019-12-27 07:14:51
前面学习了Eureka、Feign、Hystrix、Config,本篇来学习下API网关zuul。在微服务架构中,后端服务往往不直接开放给调用端,而是通过一个API网关根据请求的url,路由到相应的服务。当添加API网关后,在第三方调用端和服务提供方之间就创建了一面墙,这面墙直接与调用方通信进行权限控制,后将请求均衡分发给后台服务端。 为什么需要API Gateway 1、简化客户端调用复杂度 在微服务架构模式下后端服务的实例数一般是动态的,对于客户端而言很难发现动态改变的服务实例的访问地址信息。因此在基于微服务的项目中为了简化前端的调用逻辑,通常会引入API Gateway作为轻量级网关,同时API Gateway中也会实现相关的认证逻辑从而简化内部服务之间相互调用的复杂度。 2、数据裁剪以及聚合 通常而言不同的客户端对于显示时对于数据的需求是不一致的,比如手机端或者Web端又或者在低延迟的网络环境或者高延迟的网络环境。 因此为了优化客户端的使用体验,API Gateway可以对通用性的响应数据进行裁剪以适应不同客户端的使用需求。同时还可以将多个API调用逻辑进行聚合,从而减少客户端的请求数,优化客户端用户体验 3、多渠道支持 当然我们还可以针对不同的渠道和客户端提供不同的API Gateway,对于该模式的使用由另外一个大家熟知的方式叫Backend for front-end

How to get secure token when using “Hosted Checkout Pages” and RestApiSDK - ASP.Net

时间秒杀一切 提交于 2019-12-25 18:41:45
问题 Is it possible to use the RestApiSDK to get a secure token when using "Hosted Checkout Pages"? If so please show example. (C# preferred.) The secure token I am referring to is described on page 31 here: https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/payflowgateway_guide.pdf Please realize that I am not using "Express Checkout". (There is a lot of confusion between the old PayPal products and the new products in the PayPal documentation.) One example I found here on

SpringCloud(三) gateway + JWT进行权限管理

喜你入骨 提交于 2019-12-25 03:41:22
jwt相关知识可以查看 https://blog.csdn.net/sinat_29774479/article/details/89884500 1.引入依赖 关于jwt的操作我们采用 jjwt jjwt 是一个Java对jwt的支持库,我们使用这个库来创建、解码token <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>0.9.0</version> </dependency> 2.结合jjwt,封装一个JWTUtil类 package com.wl.gateway.util.jwt; import com.fasterxml.jackson.databind.ObjectMapper; import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtBuilder; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.binary.Base64; import javax

Looking for some one who has implemented Moneris recurring payments for a website subcription

烂漫一生 提交于 2019-12-24 09:01:11
问题 My client is using moneris as our payment gateway for a new subscription based website that I am working on. I will be using the language PHP I've looked through their documentation for PHP api and am comfortable with how it works, it seems very straight forward. One thing was missing in the documentation for me though. There is mention of how to start a recurring payment, how to update a recurring payment, but no mention of how to query a recurring payment? Some payment gateways allow you to

Securing outbound traffic rule from EC2 instances when using ECS

风格不统一 提交于 2019-12-23 13:05:26
问题 Even when I create EC2 instances in a private subnet, they must be able to send traffic to the Internet if I want to register them to a ECS cluster. I am using a NAT gateway to do this, but I still feel insecure that the instances can send private information to anywhere in case of takeover. What would be the most compact CIDR range that I can use for the instances' security group, instead of 0.0.0.0/0? 回答1: For the moment, you may have to rely on the list of public IP address ranges for AWS,

My email to text sent to vtext.com stopped working

China☆狼群 提交于 2019-12-23 12:00:08
问题 I have been sending emails (through gmail accounts and gmail smtp server) to text gateways of various wireless providers and they worked pretty well for years until this year. The messages stopped working for all verizon numbers a few months ago. I didn't receive any feedback as to why it stopped working. It is as if the email was sent successfully and then silently swallowed by vtext.com. I tried to limit the number of recipients per email but it didn't help. I did a lot of searches online