ROS中转机通过GRE隧道转发Linux落地机
2022-6-28
| 2023-3-14
字数 222阅读时长 1 分钟
type
status
date
slug
summary
tags
category
icon
password
URL

概述

客户端---ROS中转机---Linux落地机

1. 在Linux落地机配置GRE接口

以Debian为例,编辑 nano /etc/network/interfaces
auto tun0 iface tun0 inet tunnel address 10.1.1.2 netmask 30 mode gre endpoint 210.13.X.X //对端公网地址 ttl 64
执行命令 ifup tun0 启动接口,使用 ifconfig 查看接口是否正常up

2. 在ROS中转机配置GRE接口

1、添加tunnel口,配置对端公网地址 (一定要关闭keeplive)。配置完成后会有个 R(uning) 标志。
notion image
notion image
2、添加ip地址10.1.1.1/30,并绑定已创建好的tunnel接口。
notion image
3、添加接口列表(只有首次需要),并在其中添加已创建的tunnel接口。
notion image

3. 配置ROS转发规则

1、配置 srcnat 规则,绑定接口列表
notion image
2、配置 dstnat 规则,包括端口监听、目的地址和端口。
notion image
早看到这篇,我家也不至于乱这么多年,收纳规划太全了,建议收藏Mac 自用软件合集
Loading...