Code: Select all
-A FORWARD -i eth0 -p tcp --dport 81 -m state --state NEW -j ACCEPT
-A PREROUTING -p tcp --dport 81 -j DNAT --to-destination 192.168.10.49:81
best regard matthew
Code: Select all
-A FORWARD -i eth0 -p tcp --dport 81 -m state --state NEW -j ACCEPT
-A PREROUTING -p tcp --dport 81 -j DNAT --to-destination 192.168.10.49:81
yes, of course! I've experimented with your hints and nothing helps... Could it be that the rewrite-rules in /etc/apache2/conf.d/admin.conf makes my requests impossible by changing for example http://ip:81 in http://ip/admin:81 ?so do you still have that one?
Code: Select all
1 # Generated by iptables-save v1.4.8 on Wed Mar 7 12:25:12 2012
2 *nat
3 :PREROUTING ACCEPT [41:4052]
4 -A PREROUTING -i eth0 -p tcp -m tcp --dport 81 -j DNAT --to-destination 192.168.10.49:81
5 :INPUT ACCEPT [23:2017]
6 :OUTPUT ACCEPT [14:1088]
7 :POSTROUTING ACCEPT [1:90]
8 -A POSTROUTING -o eth0 -j MASQUERADE
9 COMMIT
10 # Completed on Wed Mar 7 12:25:12 2012
11 # Generated by iptables-save v1.4.8 on Wed Mar 7 12:25:12 2012
12 *filter
13 :INPUT DROP [0:0]
14 :FORWARD DROP [0:0]
15 :OUTPUT ACCEPT [1:260]
16 -A INPUT -p tcp -m tcp --tcp-flags SYN,ACK SYN,ACK -m state --state NEW -j REJECT --reject-with tcp-reset
17 -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
18 -A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
19 -A INPUT -i br0 -j ACCEPT
20 -A INPUT -i lo -j ACCEPT
21 -A INPUT -i eth0 -p icmp -m icmp --icmp-type 11 -j ACCEPT
22 -A INPUT -i eth0 -p icmp -m icmp --icmp-type 8 -j ACCEPT
23 -A INPUT -p icmp -m icmp --icmp-type 3/4 -j ACCEPT
24 -A INPUT -i eth0 -p tcp -m tcp --dport 41667 -j ACCEPT
25 -A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
26 -A INPUT -i eth0 -p tcp -m tcp --dport 443 -j ACCEPT
27 -A INPUT -i eth0 -p tcp -m tcp --dport 143 -j ACCEPT
28 -A INPUT -i eth0 -p tcp -m tcp --dport 993 -j ACCEPT
29 -A INPUT -i eth0 -p tcp -m tcp --dport 21 -j ACCEPT
30 -A FORWARD -d 192.168.10.49 -i eth0 -p tcp -m tcp --dport 81 -j ACCEPT
31 -A FORWARD -i br0 -j ACCEPT
32 -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
33 -A FORWARD -p icmp -m icmp --icmp-type 3/4 -j ACCEPT
34 COMMIT
35 # Completed on Wed Mar 7 12:25:12 2012
Code: Select all
iptables-restore firewall.conf
Code: Select all
iptables -vnL
Code: Select all
iptables -t nat -vnL
Code: Select all
-A PREROUTING -i br0 -d $eth0_IP --dport 81 -j DNAT --to-destination .....
You are totally right, I thought it is more clear displayed so, but iptables writes it like you said...While the sequence is a bit off - regular format would show line 4 after line 7 - the fact that it does work from the outside proves that the rules actually are active though, so no worries there.
Code: Select all
-A PREROUTING -d mywan-ip -p tcp -m tcp --dport 81 -j DNAT --to-destination 192.168.10.49:81