NAT rule not working again after server reboot
I'm newbie of linux networking and have been try and error for few days, without any progress.....any help would be much appreciated!!! Thanks guys!!!
- A physical server running CentOS 6 with KVM installed, 2 vm is defined now, named as VM 2 and VM 3 and ip is 192.168.122.2 and 192.168.122.3 accordingly
- Iptables running at host OS but NOT at guest OSs.
- Host OS iptables has configure NAT as follow:
- 2 DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:30022 to:192.168.122.3:22
- 3 DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:20022 to:192.168.122.2:22
- Thus this is expected to have host OS high port to be forward to VM's ssh port
- Everything work fine after installation, and we have run for a month, however after a RAM upgrade at physical server - that means the server is shutdown and reboot, the NAT/port forward is not function anymore, given that:
- Host OS iptables is started, while guest OS is keep as stop
- Host OS can ssh/telnet VM's ssh port (22)
- Result of command iptables -t nat -L -v -n:
- pkts bytes target prot opt in out source destination
- 6 304 LOG tcp -- br0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:30022 LOG flags 0 level 4 prefix `ROUTE APP3'
- 6 304 DNAT tcp -- br0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:30022 to:192.168.122.3:22
- 3 152 DNAT tcp -- br0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:20022 to:192.168.122.2:22
- Package is handled by the NAT rule while I try to telnet 30022 from my local PC (separate network)