Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ADD IPv4 Block In the Private IP Range
- (ie 192.168.0.0/24, 10.0.0.0/24)
- nano /etc/modprobe.d/openvz.conf
- Change ip_conntrack ip_conntrack_disable_ve0=1 to ip_conntrack ip_conntrack_disable_ve0=0
- CREATE NAT Access
- iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to NODEIP
- Change Node IP to External IP Address
- SSH Port Forwarding (TCP & UDP)
- iptables -t nat -A PREROUTING -p tcp -d NODEIP --dport EXTERNALPORTNUMBER -i eth0 -j DNAT --to-destination *Internal IP*:22
- iptables -t nat -A PREROUTING -p udp -d NODEIP --dport EXTERNALPORTNUMBER -i eth0 -j DNAT --to-destination *Internal IP*:22
- Change NODEIP to External IP address you want to use
- change EXTERNALPORTNUMBER to what port you want to forward for SSH
- change internal ip to the internal ip address assigned.
- Forwarding Other Ports
- iptables -t nat -A PREROUTING -p tcp -d NodeIP --dport startPort:endPort -j DNAT --to-destination *Internal IP*
- Change NodeIP to external Address
- Change startPort to what port you wish to start with (ie, 201 - Do not Inlcude the SSH Port)
- Change endPort to the last port you want to forward
- change internal IP to the Internal IP address added.
- Other then that. fairly simples... but trial and error.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement