# nh-poc **Repository Path**: iexception007/nh-poc ## Basic Information - **Project Name**: nh-poc - **Description**: nh poc project - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-03-03 - **Last Updated**: 2025-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 南航poc 1. ali-part, 阿里园区系统 2. nh-center, 南航中台系统 nginx 转发代理 3. nh-gateway,南航网关系统 nginx 转发代理 阿里园区系统 1. ali-park-service 9090 子系统: 1. hk-video-manager 9091 2. hk-channel-manager 9092 ### 测试环境网络 宿主机 ``` WIFI IP: 10.56.33.65 ``` VM1 ``` ens160: NAT 192.168.255.201 ``` VM2 ``` ens160: NAT 192.168.255.202 ens224: 仅主机模式 192.168.222.202 ``` VM3 ``` ens160: 仅主机模式 192.168.222.203 ``` centos8 设置ip,gateway,dns ``` nmtui nmcli connection modify ens160\ ipv4.addresses 192.168.255.201/24 \ ipv4.gateway 192.168.255.2 \ ipv4.dns "10.32.104.239,233.5.5.5" \ ipv4.method manual nmcli connection modify ens224\ ipv4.addresses 192.168.222.100/24 \ ipv4.method manual ``` ### 在vm2中设置iptables规则之后,vm3可以直接访问vm1,宿主机 ``` vim /etc/sysctl.conf net.ipv4.ip_forward = 1 net.ipv6.conf.all.forwarding = 1 sysctl -p /etc/sysctl.conf sysctl -w net.ipv4.ip_forward=1 iptables -t nat -A POSTROUTING -s 192.168.43.0/24 -o ens160 -j MASQUERADE #iptables -I FORWARD 1 -i ens224 -o ens160 -j ACCEPT #iptables -I FORWARD 1 -i ens160 -o ens224 -j ACCEPT ```