我在两个AWS区域之间build立了隧道。 使用iperf,我看到如果我直接连接两台机器(通过互联网),我得到大约100mb / s。 如果我使用隧道,我得到10mb / s。 有没有办法加快速度? 这是我的configuration: proto tcp-server port 1996 dev tun-us-east-1 remote <public IP> route 10.8.0.0 255.255.0.0 ifconfig 10.248.0.1 10.248.0.2 keepalive 10 120 secret ovpn.key log /var/log/openvpn.log persist-tun persist-key user nobody group nogroup 对方基本上是一样的。 我尝试使用UDP,但它仍然很慢。 我也尝试删除压缩,甚至encryption,但没有真正的变化。
我在Debian 8.3节点上有两个Docker容器。 一个是官方postgres图像,一个是基本的凤凰/灵药应用程序。 我正在连接一个docker堆栈文件。 但凤凰是无法连接到postgres,除非我发布端口。 这让我觉得有些内部dockernetworking是错误的,因为这个节点是新的Debian安装,它可能是iptables。 这也不包括密码或主机名是错误的。 我在做什么错了什么是正确的方法来设置iptables规则,以允许两个容器进行通信? 在凤凰应用程序中的错误消息: app-1 | 2016-03-15T16:15:18.019402549Z ** (Mix) The database for App.Repo couldn't be created, reason given: psql: could not connect to server: Connection refused app-1 | 2016-03-15T16:15:18.019456447Z Is the server running on host "postgres" (10.7.0.1) and accepting app-1 | 2016-03-15T16:15:18.019468609Z TCP/IP connections on port 5432? 在postgres容器中输出日志文件 postgres-1 | […]
(从AskUbuntu dublicate问题)我有一个下面的networking图: networking图 192.168.0.0/24networking与4个networking服务器(.1,.2,.3,.4)。 其中有2个Ubuntu 14.04(VM1和VM2)。 它们有两个物理接口(eth0和eth1)。 和一个L2TP以太网隧道,configuration方式如下: root@vm1:~# modprobe l2tp_eth root@vm1:~# ip l2tp add tunnel tunnel_id 1000 peer_tunnel_id 2000 encap udp local 10.0.0.1 remote 10.0.1.1 udp_sport 6000 udp_dport 5000 root@vm1:~# ip l2tp add session tunnel_id 1000 session_id 3000 peer_session_id 4000 root@vm2:~# modprobe l2tp_eth root@vm2:~# ip l2tp add tunnel tunnel_id 2000 peer_tunnel_id 1000 encap udp […]
我有两个服务器:一个接收来自外部LAN和另一个(LAN内)的连接,我打算通过ssh从外部访问。 有先决条件:我不能访问我的SSH服务与22以外的其他端口; 当然,第一台服务器也必须通过SSH访问。 我为入口服务器创build了一个networking别名: allow-hotplug eth0 iface eth0 inet static address 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.254 # DNS directives allow-hotplug eth0:1 iface eth0:1 inet static address 192.168.1.2 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.254 # DNS directives 我的策略是:在防火墙的情况下,将所有SSH连接转发到第二个IP地址到局域网内的服务器。 所以,我执行了这些命令来configuration防火墙(172.16.1.1是LAN内服务器的IP地址): # iptables -A FORWARD -p tcp -d 172.16.1.1 –dport 22 -m […]
我有一个IPsec网关给客户,VPN隧道已经启动,问题是他们不允许我使用我的私人地址,因为它使用了另一个VPN。 我们的网关是使用公共弹性IP在Amazon云中托pipe的EC2实例: 我的gw:10.0.3.22 – > Elastic IP:1.1.1.1 – >他们的IPsec gw 2.2.2.2 我必须连接到他们的IPsec gw后面的一个服务器3.3.3.3,当我尝试数据包时不要回头: $ telnet 3.3.3.3 443 (the only opened port) 10.0.3.22 > 2.2.2.2 (ESP traffic, seq=0x1) 10.0.3.22 > 2.2.2.2 (ESP traffic, seq=0x2) … until timeout 客户可以确认VPN隧道已经启动,他们可以看到日志中的stream量,但是在防火墙到达3.3.3.3之前就会被丢弃。 他们只接受1.1.1.1作为来源。 所以我必须隐藏我的私有IP 10.0.3.22 NAT到1.1.1.1。 这可能使用iptables? 我试图做SNAT和DNAT,但它不起作用: sudo iptables -t nat -A POSTROUTING -j MASQUERADE sudo iptables -t nat […]
我想阻止我的两个接口之间的所有stream量。 我在eth1接口上使用erpxe,看来当我启动到erpxe时,它从eth0中拉出一个ip地址。 我怎么能通过iptables来完成这个? eth0 Link encap:Ethernet HWaddr 00:0f:b5:fb:d7:ca inet addr:192.168.2.129 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::20f:b5ff:fefb:d7ca/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:32094 errors:0 dropped:0 overruns:0 frame:0 TX packets:27377 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:22013025 (20.9 MiB) TX bytes:4120708 (3.9 MiB) eth1 Link encap:Ethernet HWaddr 00:0f:b5:f6:a2:dd inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: […]
我有6个OSSEC安装(5个代理+ 1台服务器,全部是Debian 8),全部configuration为使用iptables从10分钟到1个月时间内阻止重犯。 我有时需要重新启动一个或多个服务器。 每当OSSEC添加的iptables规则被删除。 这也发生在重新启动ossec(./ossec-control restart) 是否有一个简单的解决scheme来保持规则,或者我将不得不修改主动响应脚本来运行iptables – 保存每一个IP是封锁/解锁?
我有一个云SSD VPS @ OVH,我想改变用于请求的默认接口。 我有两个接口:eth0(这是默认的接口)和eth0:0(这是我想使用的新的虚拟接口)。 这里是route -n和interfaces文件的输出: daniil@vps262458:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 164.132.40.1 0.0.0.0 UG 0 0 0 eth0 164.132.40.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 daniil@vps262458:~$ cat /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback auto eth0 iface […]
我刚刚在我的学校社区启动了一个网站,今天早上醒来,有人试图暴力破解我的服务器。 我跟着digitalocean上的一些指南来设置fail2ban和iptables ,并且仍然能够使用端口22 ssh进入服务器。 但是,我似乎无法通过SFTP与服务器交互。 我已经尝试winscp和filezilla都似乎超时 对于winscp我得到这个: Host is not communicating for more than 15 seconds. Authentication log (see session log for details): Using username "will". Authentication failed. 和filezilla我得到这个: Status: Resolving address of %website% Status: Connecting to %ip%:21… Error: Connection timed out after 20 seconds of inactivity Error: Could not connect to server Status: Waiting […]
我想用这个列表阻止世界上所有数据中心的所有IPS: https : //github.com/client9/ipcat 但我不知道如何使用该列表,我想要一个bash脚本来检查每天是否有更新(或使用GitHub webhook进行更改:D),并为所有ips添加IPTable规则,以便删除连接这些说ips 🙂 我只需要知道我将如何使用ipcat列表来阻止与IPTables ips 提前致谢 :)