全球主机交流论坛

标题: 求助Proxmox VE网络配置 [打印本页]

作者: ffb    时间: 2021-6-4 21:59
标题: 求助Proxmox VE网络配置
买了云筏得那个300块得,如何配置IP才能让开得小鸡可以联网?准备开个win得然后开个linux得。。
作者: ApkB    时间: 2021-6-4 22:02
理解能力差,没办法帮到你。帮顶
作者: sdqu    时间: 2021-6-4 22:05
云筏有这么高的知名度么,谁知道他的ip及路由规则。。
通常,vmbr0桥接到物理网卡,小鸡绑在vmbr0上。

作者: ffb    时间: 2021-6-4 22:34
sdqu 发表于 2021-6-4 22:05
云筏有这么高的知名度么,谁知道他的ip及路由规则。。
通常,vmbr0桥接到物理网卡,小鸡绑在vmbr0上。
...

proxmox vm
作者: 无神通    时间: 2021-6-4 22:39
https://pve.proxmox.com/wiki/Network_Configuration
作者: 快乐的小2b    时间: 2021-6-4 22:44
有几个ip?联系腾讯3300008886
作者: ffb    时间: 2021-6-4 22:45
快乐的小2b 发表于 2021-6-4 22:44
有几个ip?联系腾讯3300008886

就一个公网IP。
作者: 快乐的小2b    时间: 2021-6-4 22:45
ffb 发表于 2021-6-4 22:45
就一个公网IP。

那岂不是很简单
作者: ffb    时间: 2021-6-4 22:57
快乐的小2b 发表于 2021-6-4 22:45
那岂不是很简单

这个应该属于会者不难,难者不会。
作者: ffb    时间: 2021-6-4 23:06
快乐的小2b 发表于 2021-6-4 22:45
那岂不是很简单

是要类似这样填写吗?
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
        address  198.51.100.5
        netmask  255.255.255.0
        gateway  198.51.100.1
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp


auto vmbr0
iface vmbr0 inet static
        address  203.0.113.17
        netmask  255.255.255.248
        bridge-ports none
        bridge-stp off
        bridge-fd 0
作者: xueyuan    时间: 2021-6-4 23:37
云筏机器速度怎么样?
作者: ffb    时间: 2021-6-4 23:40
xueyuan 发表于 2021-6-4 23:37
云筏机器速度怎么样?

没测过速度

作者: txjcv    时间: 2021-6-5 09:25
楼主是想nat ?
作者: ffb    时间: 2021-6-5 14:31
txjcv 发表于 2021-6-5 09:25
楼主是想nat ?

有个/64得IPV6。有点想纯IPV6了。。IPV4不晓得nat得话架网站好搞不。。
作者: Becod    时间: 2021-6-13 11:50
内建一个网桥做中转
  1. auto vmbr1
  2.     iface vmbr1 inet static
  3.             address 10.0.0.0.1
  4.             netmask 255.255.255.0
  5.             bridge_ports none
  6.             bridge_stp off
  7.             bridge_fd 0
  8.             post-up echo 1 > /proc/sys/net/ipv4/ip_forward
  9.             post-up bash /root/iptables.config.sh
  10.             post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
  11.             post-down iptables -t nat -D POSTROUTING -s 10.0.0.0/24' -o vmbr0 -j MASQUERADE
复制代码

新建小鸡网卡桥接到vmbr1这个接口就行了
端口映射直接iptables
  1. iptables -t nat -A PREROUTING -i vmbr0 -p <协议> --dport <母鸡端口> -j DNAT --to-destination <小鸡ip>:<小鸡端口>
复制代码

作者: tem    时间: 2021-6-13 12:03
Virtio可以使用软路由 方便快捷 性能基本没区别
作者: xueyuan    时间: 2021-6-13 12:34
tem 发表于 2021-6-13 12:03
Virtio可以使用软路由 方便快捷 性能基本没区别

PVE怎么配置软路由管理小鸡呢,只有一个IP
作者: 天权璇玑    时间: 2021-6-13 13:40
不懂帮顶
作者: ffb    时间: 2021-6-13 18:00
Becod 发表于 2021-6-13 11:50
内建一个网桥做中转

新建小鸡网卡桥接到vmbr1这个接口就行了

这样配置得,但是不知道是配置有问题还是什么,小鸡会在2天内无法访问大部分网站,挂的网站也变成502.
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address  public ip address
        netmask  32
        gateway  公网网关
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0

iface vmbr0 inet6 static
        address  IPIV6
        netmask  64
        gateway  V6网关
auto vmbr2
iface vmbr2 inet static
        address  10.0.0.254
        netmask  255.255.255.0
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8888 -j DNAT --to 10.0.0.102:8888
        post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 8888 -j DNAT --to 10.0.0.102:8888
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3389 -j DNAT --to 10.0.0.102:3389
        post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 3389 -j DNAT --to 10.0.0.102:3389
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 10022 -j DNAT --to 10.0.0.102:22
        post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 10022 -j DNAT --to 10.0.0.102:22
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.0.0.102:80
        post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.0.0.102:80
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to 10.0.0.102:443
        post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to 10.0.0.102:443

iface vmbr2 inet6 static
        address  IPV6
        netmask  64




欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/) Powered by Discuz! X3.4