连接到VM虚拟机的NVIDIA 边缘服务器apt-get更新源失败
Posted Kris_u
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了连接到VM虚拟机的NVIDIA 边缘服务器apt-get更新源失败相关的知识,希望对你有一定的参考价值。
本机Windows系统无法连接到NVIDIA 边缘服务器,通过本机内的虚拟机Ubuntu做路由转发。便可通过虚拟机ssh登录到nvidia服务器。
NVIDIA 边缘服务器:Ubuntu 18.04系统
IPtables没有设置IP FORWARDING
解决办法:
虚拟机Ubuntu
Firstly, enable /proc/sys/net/ipv4/ip_forward=1.
sysctl -a |grep forward
echo 1 > /proc/sys/net/ipv4/ip_forward
sysctl -a |grep forward
iptables need to 切换到root权限:
$sudo passwd root
//type password
// retype password
$su +enter:切换到root用户权限
Secendly, set iptables FORWARD
iptables -A FORWARD -s 192.168.35.0/24 -o ens33 -j ACCEPT
iptables -A FORWARD -d 192.168.35.0/24 -i ens33 -m state --state RELATED,ESTABLISHED -j ACCEPT
//路由转发
iptables -t nat -A POSTROUTING -s 192.168.35.0/24 -o ens33 -j MASQUERADE
iptables -t nat -S
iptables -t nat -D POSTROUTING 1
//查看IP tables
iptables -nvL --line-numbers
iptables -help +enter:
Usage: iptables -[ACD] chain rule-specification [options]
iptables -I chain [rulenum] rule-specification [options]
iptables -R chain rulenum rule-specification [options]
iptables -D chain rulenum [options] //删除IP tables的某行
iptables -[LS] [chain [rulenum]] [options]
iptables -[FZ] [chain] [options]
iptables -[NX] chain
iptables -E old-chain-name new-chain-name
iptables -P chain target [options]
iptables -h (print this help information)
s
ssh登录其他服务器。16.04版本的Ubuntu需要安装openssh-server:
$sudo apt-get install openssh-server
suao apt-get update 还有一个问题是:
找不到某些镜像 Could not resolve "mirrors.ustc.edu.cn"
$ sudo vim /etc/resolv.conf
修改DNS:
nameserver 8.8.8.8
nameserver 8.8.4.4
然后重启网络服务:sudo etc/init.d/networking restart
再次执行sudo apt-get update命令,结果一切正常。
virtual machine ssh to nvidia AGX ubuntu 18.04
nvidia ubuntu : l4tbr0 is nvidia's
systemd-resolve --status
systemd-resolve -i l4tbr0 --set-dns=8.8.8.8
systemd-resolve --status | grep 'DNS Servers'
Ceres-solver安装中的问题:make test 卡在Start 103无法继续运行:其实这个make test可以不用管,按照官方教程测试一下是否安装成功就可以了。
官方安装教程:安装 · Ceres Solver 中文教程 (gitbooks.io)
以上是关于连接到VM虚拟机的NVIDIA 边缘服务器apt-get更新源失败的主要内容,如果未能解决你的问题,请参考以下文章