OpenVZ Forum


Home » General » Support » Firewall and NAT (Problem enabling NAT)
Firewall and NAT [message #38416] Fri, 18 December 2009 03:49 Go to next message
foxb is currently offline  foxb
Messages: 12
Registered: December 2009
Junior Member
Hi,

I followed the tutorial:
http://wiki.openvz.org/Setting_up_an_iptables_firewall#Setti ng_up_a_HN-based_firewall

But Now I want to enable NAT (CT to be with Private IP)

As described here:
http://wiki.openvz.org/NAT

iptables -t nat -A POSTROUTING -s 192.168.12.0/24 -o eth0 -j SNAT --to xx.xx.xx.xx
iptables -t nat -A PREROUTING -p tcp -d xx.xx.xx.xx --dport 888 -i eth0 -j DNAT --to-destination 192.168.12.12:80

But nothing happens?

No error, but when I issue iptables -L -n noting appears?!

Host is CentOS 5

It should be obvious mistake, but cannot figure it...

Any suggestions?

If additional information is needed, please let me know.
Re: Firewall and NAT [message #38422 is a reply to message #38416] Fri, 18 December 2009 12:50 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
# iptables -t nat -L
Re: Firewall and NAT (Sort of solved - closed) [message #38507 is a reply to message #38422] Mon, 28 December 2009 12:04 Go to previous message
foxb is currently offline  foxb
Messages: 12
Registered: December 2009
Junior Member
Sorry for the delay... was a bit busy

Yes that command shows the existence, but the command does not work.

I've decided to switch to shorewall since I've used it in the past + I need more advanced firewall that the one in the firewall script and it worked.

Topic closed...
Previous Topic: Configure virtualized /proc
Next Topic: centos4 didn't find ovzkernel-devel, maybe give a try for el5 kernel flavor?
Goto Forum:
  


Current Time: Wed May 29 19:13:17 GMT 2024

Total time taken to generate the page: 0.01535 seconds