OpenVZ Forum


Home » General » Support » SSH and IPTABLES
Re: SSH and IPTABLES [message #33704 is a reply to message #33564] Sat, 01 November 2008 19:05 Go to previous message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
I think you may need a FORWARD rule.
These are the lines my firewall script has to forward ssh to my ssh server:

iptables -t nat -A PREROUTING -i $ifINTERNET -p tcp --sport $UNPORTS --dport $PORT_SSH_EXTERNAL -j DNAT --to-destination $sSSHSERVER:22
iptables -A FORWARD -i $ifINTERNET -o $ifVENET0 -p tcp --sport $UNPORTS -d $sSSHSERVER --dport ssh -m state --state NEW -j ACCEPT

 
Read Message
Read Message
Previous Topic: Problem Upgrade from 2.4.21 to openvz 2.6.18
Next Topic: NATed GRE packets does not reach VETH (NAT,GRE,VETH)
Goto Forum:
  


Current Time: Mon Sep 02 00:58:21 GMT 2024

Total time taken to generate the page: 0.05677 seconds