I am using Centos7 in my physical server with public address and I have guest machine running on KVM environment with private IP address 192.168.122.2 I need to install httpd in the guest machine and redirect the traffic from the public IP address to the private adress 192.168.12.2.I tried:
Code: Select all
iptables -t Nat -A PREROUTING -I em1 -p TCP --deport 80 -j DNAT --to-destination 192.168.122.2:80
Code: Select all
Chain FORWARD (policy DROP 12 packets, 720 bytes) pkts bytes target prot opt in out source destination
7 420 ACCEPT tcp -- * * 0.0.0.0/0 192.168.122.2 tcp dpt:80
Chain OUTPUT (policy ACCEPT 406 packets, 59695 bytes) pkts bytes target prot opt in out source destination
0 0 DROP icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 0
Regards