我试图使用ssh端口转发来打败企业防火墙:
ssh git@GIT_SERVER -L9418:GIT_SERVER:9418
Run Code Online (Sandbox Code Playgroud)
在另一个终端我跑
git clone git://localhost:repositories/project.git
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误:
/Users/aboxer/tmp/glucosia/.git/中初始化的空Git存储库
致命:无法查找localhost(端口存储库)(提供节点名称或服务名称,或未知)
谢谢!
我需要在我的大学网络中连接(在rdp中)到一台机器(让我们称之为#1)(我有它的内部IP),我也可以访问ssh中同一网络中的Linux服务器机器,我可以用来访问#1,我正在使用putty,有人可以向我解释我如何连接它吗?
[我的笔记本电脑] ---> [Linux服务器] ---> [windows机器]在rdp
谢谢,
作为Google支持Google Compute Engine上的原生IPv6之前的一个障碍,我想配置一个6in4(IP协议41)隧道.
我添加了防火墙规则以允许我的VM网络上的协议41:
Name Source tag / IP range Allowed protocols / ports Target tags
allow-6in4 216.66.xxx.xxx 41 Apply to all targets
Run Code Online (Sandbox Code Playgroud)
并配置隧道/etc/network/interfaces:
auto 6in4
iface 6in4 inet6 v4tunnel
address 2001:470:xxxx:xxxx::2
netmask 64
endpoint 216.66.xxx.xxx
gateway 2001:470:xxxx:xxxx::1
ttl 64
up ip link set mtu 1280 dev $IFACE
Run Code Online (Sandbox Code Playgroud)
并且ping6 2001:470:xxxx:xxxx::1验证了6in4流量是出站的:
$ sudo tcpdump -pni eth0 host 216.66.xxx.xxx
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening …Run Code Online (Sandbox Code Playgroud) 我使用MobaXterm远程访问在云中运行的服务器.出于开发和管理目的,这些服务器在本地网络接口上公开管理应用程序.例如,Tomcat将公开127.0.0.1/manager.
由于我不想将这些服务暴露给互联网,我在MobaXterm中设置了ssh隧道,通过本地端口转发连接到本地端口上的这些Web应用程序,这很容易通过应用程序本身进行设置.
我的问题:如何让MobaXterm在会话打开时自动启动隧道,并在会话结束时停止/关闭它们?
我知道像Putty这样的客户端会默认执行此操作,但如果我不需要,我不想为不同的工作使用不同的客户端,而且MobaXterm还有其他我需要的功能,而Putty则没有.
对于混合云用例,我们正在研究 EnvoyProxy 是否适合作为跨本地防火墙移动数据的解决方案。预期的设置如下:
使用 Envoy 将数据路由到上游集群已有详细记录。但是,我们想知道 Envoy 是否能够在两个代理实例之间设置 TLS 连接并在两个方向上使用该通道。限制是该 TLS 连接只能从一个方向(出站)建立。
如果这是可能的,有人可以指出我正确的方向吗?
谨致问候, 乔斯特
是否有可能通过socat实用程序在类似ttyS0的串行(调制解调器)设备上获得双向IP隧道?我试图使用TUN选项但仍无法获得结果.
欢迎任何建议:)
更新:
PC1:
socat /dev/ttyUSB0,raw,echo=0,b57600,clocal TUN:192.168.1.1/24,up
Run Code Online (Sandbox Code Playgroud)
PC2:
socat /dev/ttyUSB0,raw,echo=0,b57600,clocal TUN:192.168.1.2/24,up
Run Code Online (Sandbox Code Playgroud)
之后,我看到tun0接口两端都有正确的地址,但我不能ping其他地址.而不是那样,当我发送带有ping -c 1 192.168.1.1远程socat进程出口的数据并且它的tun0设备被破坏时.有什么建议?..
UPDATE2:
当我们尝试使用socat进行串行TCP/IP隧道时,会出现帧错误.socat的开发人员Gerhard Rieger告诉我:
我担心你是对的.数据报套接字工作,以及 - 运气 - 也通过管道.但是在串行线路上,数据包边界可能会消失,这在将数据发送到tun接口时是致命的.
我现在不能提供基于社交的解决方案,抱歉.但是,我将尝试在更高版本2的版本中集成一些框架.
I am trying to write an HTTP tunnel as we want to be able to connect to a remote machine through our web application. While I am aware of the security risks involved, it's something we would like to do. It's not hosted on the internet, but on private networks, so the risk is considered low.
The basic requirement is to allow the Java Debugging tool to connect through a servlet to a machine. We have some clients that insist …
我有 3 台服务器(a、b、c),每台服务器都需要一个 ssh 隧道到另外 2 个实例的 4000 端口。
我曾经分配端口,例如 4001 到实例 B 上的端口 4000,而 4002 到实例 C 上的 4000 端口,但似乎使用本地 ips 127.0.0/24 会少得多,例如 put 127.0.0.2 instance-ato /etc/hosts,然后使用ssh -L instance-a:4000:localhost:4000 instance-a.domain.com。这种方法是否有任何负面影响?应该使用吗?
我需要使用 SSH 建立隧道才能访问数据库。使用 sshtunnel ( https://github.com/pahaz/sshtunnel/ )在 Python 代码中创建隧道后,脚本挂起,不再执行其他命令。我从提供的代码中看到的最后一个打印是 local_bind_port。之后的一切都被卡住了。我是否误解了一些基本原则?
当我通过 cmd 行手动创建隧道时,db 连接在单独的 python 脚本中工作正常。
系统:Python 3.6.1、sshtunnel 0.1.2、macOS 10.12、服务器为CentOS 7
蟒蛇代码:
import pymysql.cursors
import sshtunnel
with SSHTunnelForwarder(
('gateway_host', gateway_port),
ssh_username='ssh_username',
ssh_pkey='/path/to/id_rsa',
ssh_private_key_password='pw',
remote_bind_address=('remote_bind', 3306),
local_bind_address=('127.0.0.1', 3306),
logger=create_logger(loglevel=1)
) as tunnel:
print('Establishing connection')
print('tunnel_bindings:', tunnel.tunnel_bindings)
print('tunnel_is_up:', tunnel.tunnel_is_up)
print('local_bind_port:', tunnel.local_bind_port)
connection = pymysql.connect(host='127.0.0.1',
port=3306,
user='db_username',
password='db_password',
db='db_name',
cursorclass=pymysql.cursors.DictCursor)
try:
with connection.cursor() as cursor:
sql = '''SELECT VERSION();'''
cursor.execute(sql)
result = cursor.fetchall()
print(result)
finally:
connection.close()
print('Finish')
Run Code Online (Sandbox Code Playgroud)
日志输出(在最后一行之后它卡住了):
2017-07-26 22:42:37,788| INF | Srv-3306/1318@sshtunnel …Run Code Online (Sandbox Code Playgroud) 要构建某个图像,我需要创建一个隧道并使 docker 使用此隧道作为 socks5 代理(也将代理用于 DNS)。
所以现在我有几个问题:
tunnel ×10
ssh ×4
proxy ×2
automation ×1
dns ×1
docker ×1
envoyproxy ×1
firewall ×1
git ×1
ip ×1
ipv6 ×1
java ×1
linux ×1
mobaxterm ×1
mtls ×1
paramiko ×1
putty ×1
python-3.x ×1
rdp ×1
serial-port ×1
servlets ×1
socat ×1
sockets ×1
socks ×1
ssh-tunnel ×1