如何开共享IP的小鸡 ?
手里有个10刀杜甫 想折腾下有没有教程 vmware开nat鸡 月痕 发表于 2016-3-7 10:26
vmware开nat鸡
不能装WIN docker? 安装openvz然后开小鸡 端口转发。 docker明显不适合开小鸡...
用nat转发 auto vmbr1
iface vmbr1 inet static
address 10.99.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.99.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.99.0.0/24' -o vmbr0 -j MASQUERADE
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1001 -j DNAT --to 10.99.0.1:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1001 -j DNAT --to 10.99.0.1:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1002 -j DNAT --to 10.99.0.2:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1002 -j DNAT --to 10.99.0.2:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1003 -j DNAT --to 10.99.0.3:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1003 -j DNAT --to 10.99.0.3:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1004 -j DNAT --to 10.99.0.4:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1004 -j DNAT --to 10.99.0.4:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1005 -j DNAT --to 10.99.0.5:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1005 -j DNAT --to 10.99.0.5:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1006 -j DNAT --to 10.99.0.6:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1006 -j DNAT --to 10.99.0.6:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1007 -j DNAT --to 10.99.0.7:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1007 -j DNAT --to 10.99.0.7:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1008 -j DNAT --to 10.99.0.8:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1008 -j DNAT --to 10.99.0.8:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1009 -j DNAT --to 10.99.0.9:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1009 -j DNAT --to 10.99.0.9:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1010 -j DNAT --to 10.99.0.10:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1010 -j DNAT --to 10.99.0.10:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1011 -j DNAT --to 10.99.0.11:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1011 -j DNAT --to 10.99.0.11:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1012 -j DNAT --to 10.99.0.12:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1012 -j DNAT --to 10.99.0.12:3389 lewissue 发表于 2016-3-7 10:54
谢谢大神 端口转发一下
页:
[1]