Folks
I have the following setup.
Linux Workstation with 2 NIC RHWS 4.7
eth0 10.49.7.14 (Normal Vlan)
eth1 192.162.1.2 (Private Vlan)
On the Private Vlan is a Tape drive with its own Web interface
IP address 192.162.1.1
I would like to allow any one to point there web browser at 10.49.7.14
but get re-directed to the Tape Web interface.
I have tried the following but did not seem to work.
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j DNAT --to 192.162.1.2:80
iptables -A FORWARD -p tcp --dport 80 -d 192.162.1.2 -j ACCEPT
iptables -A FORWARD -p tcp --sport 80 -d 192.162.1.2 -j ACCEPT
iptables -nvL Shows the following
Code:
Chain INPUT (policy ACCEPT 2998 packets, 413K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 7 packets, 420 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.162.1.2 tcp dpt:80
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.162.1.2 tcp spt:80
Chain OUTPUT (policy ACCEPT 1055 packets, 104K bytes)
pkts bytes target prot opt in out source destination
iptables -t nat -nvL Shows the following
Code:
Chain PREROUTING (policy ACCEPT 2113 packets, 259K bytes)
pkts bytes target prot opt in out source destination
14 840 DNAT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.162.1.2
0 0 DNAT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.162.1.2:80
0 0 DNAT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.162.1.2:80
Chain POSTROUTING (policy ACCEPT 216 packets, 20556 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 210 packets, 20196 bytes)
pkts bytes target prot opt in out source destination
Can any body help and suggest where I have gone wrong.
Thanks
Matt