Hi
I moved the website from the bubba to bubba2
but still the port forwarding does not work
I have a apache2 server running on port 8080
heracles:/var/log/apache2# netstat -an|grep LISTEN |grep 8080
tcp6 0 0 :::8080 :::* LISTEN
Create a new rule
heracles:/var/log# iptables -vL -t nat
Chain PREROUTING (policy ACCEPT 6039 packets, 800K bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:www to:192.168.1.3:8080
Chain POSTROUTING (policy ACCEPT 3991 packets, 1335K bytes)
pkts bytes target prot opt in out source destination
1533 88332 MASQUERADE 0 -- any eth0 anywhere anywhere
Chain OUTPUT (policy ACCEPT 4139 packets, 1344K bytes)
pkts bytes target prot opt in out source destination
heracles:/var/log# iptables -vL
Chain INPUT (policy DROP 354 packets, 41737 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT tcp -- any any anywhere anywhere tcp flags:SYN,ACK/SYN,ACK state NEW reject-with tcp-reset
0 0 DROP tcp -- any any anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN state NEW
977 356K ACCEPT 0 -- eth0 any anywhere anywhere state RELATED,ESTABLISHED
102K 29M ACCEPT 0 -- eth1 any anywhere anywhere
11 2400 ACCEPT 0 -- lo any anywhere anywhere
0 0 ACCEPT icmp -- eth0 any anywhere anywhere icmp time-exceeded
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
515K 27M ACCEPT 0 -- eth1 any anywhere anywhere
728K 963M ACCEPT 0 -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:webcache
Chain OUTPUT (policy ACCEPT 33814 packets, 14M bytes)
pkts bytes target prot opt in out source destination
Now i will hit the site from outside, using my phone and
www.grc.com shields up utility.
Now i get hits on the NAT rule, but not on the FORWARD.
Also no entries in the access.log.
heracles:/var/log/apache2# iptables -vL -t nat
Chain PREROUTING (policy ACCEPT 6923 packets, 847K bytes)
pkts bytes target prot opt in out source destination
32 1448 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:www to:192.168.1.3:8080
Chain POSTROUTING (policy ACCEPT 4037 packets, 1350K bytes)
pkts bytes target prot opt in out source destination
1635 93669 MASQUERADE 0 -- any eth0 anywhere anywhere
Chain OUTPUT (policy ACCEPT 4186 packets, 1360K bytes)
pkts bytes target prot opt in out source destination
heracles:/var/log/apache2# iptables -vL
Chain INPUT (policy DROP 1107 packets, 74425 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT tcp -- any any anywhere anywhere tcp flags:SYN,ACK/SYN,ACK state NEW reject-with tcp-reset
0 0 DROP tcp -- any any anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN state NEW
1002 362K ACCEPT 0 -- eth0 any anywhere anywhere state RELATED,ESTABLISHED
104K 30M ACCEPT 0 -- eth1 any anywhere anywhere
11 2400 ACCEPT 0 -- lo any anywhere anywhere
0 0 ACCEPT icmp -- eth0 any anywhere anywhere icmp time-exceeded
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
539K 28M ACCEPT 0 -- eth1 any anywhere anywhere
764K 1014M ACCEPT 0 -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:webcache
Chain OUTPUT (policy ACCEPT 34592 packets, 14M bytes)
pkts bytes target prot opt in out source destination
cheers
Eek