Hi, i have an smtp server running behind my firewall. Every day i have had the port forwarding stop working after approx 24 hours. I masquerade on the public ip and forward port 25 and 443 to the mail server.
From a remote server i try and telnet to port 25, all i get in the console is is "trying x.x.x.x..." and nothing happens. I can ssh into the actual openwrt router itself from the outside remote connection. Other ports forwarded to different machines also fail to work. There are only 15 users on the network so the load isnt massive, i am pretty sure people arent using p2p also (they shouldnt be!).
Upon rebooting the openwrt box and everything starts working fine again.
Conntrack Settings are as follows:
Maximum Connections - 5953
Generic Timeout - 600
ICMP Timeout - 30
TCP Established Timeout - 86400
UDP Timeout - 30
UDP Stream Timeout - 180
I know TCP established timeout is 24 hours and might be the problem however this problem also happened when the value was set to 1 hour: 3600 seconds. I hit the button to set the value to defaults which was 24 hours, but this seems a bit high to me. Any idea or recommendations what these values should be? I will try setting tcp established timeout to 3600 again and upping the max connections to 8000.
Settings are also below:
Many thanks in advance,
Chris
root@router:/etc/config# cat /etc/config/network
#### VLAN configuration
config switch eth0
option vlan0 '1 2 5*'
option vlan1 '3 4 5*'
option vlan2 '0 5*'
option vlan3 '5'
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option ifname 'eth0.0'
option proto static
option ipaddr '192.168.2.1'
option netmask 255.255.255.0
option gateway ''
option dns ''
config interface lanmgmt
option ifname 'eth0.1'
option proto static
option ipaddr '192.168.1.1'
option netmask 255.255.255.0
option gateway ''
option dns ''
#### WAN configuration
config interface wan
option ifname "eth0.2"
option proto 'static'
option dns '213.132.33.15'
option ipaddr 'x.x.x.x'
option netmask '255.255.255.252'
option gateway 'x.x.x.x'
config interface wlunsec
option type "bridge"
option ifname "eth0.3"
option proto static
option ipaddr 10.0.0.1
option netmask 255.255.255.0
option gateway ''
root@router:~# cat /etc/firewall.user
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
iptables -F input_rule
iptables -F output_rule
iptables -F forwarding_rule
iptables -t nat -F prerouting_rule
iptables -t nat -F postrouting_rule
# The following chains are for traffic directed at the IP of the
# WAN interface
iptables -F input_wan
iptables -F forwarding_wan
iptables -t nat -F prerouting_wan
### Open port to WAN
## -- This allows port 22 to be answered by (dropbear on) the router
# iptables -t nat -A prerouting_wan -p tcp --dport 22 -j ACCEPT
# iptables -A input_wan -p tcp --dport 22 -j ACCEPT
### Port forwarding
## -- This forwards port 8080 on the WAN to port 80 on 192.168.1.2
# iptables -t nat -A prerouting_wan -p tcp --dport 8080 -j DNAT --to 192.168.1.2:80
# iptables -A forwarding_wan -p tcp --dport 80 -d 192.168.1.2 -j ACCEPT
### DMZ
## -- Connections to ports not handled above will be forwarded to 192.168.1.2
# iptables -t nat -A prerouting_wan -j DNAT --to 192.168.1.2
# iptables -A forwarding_wan -d 192.168.1.2 -j ACCEPT
iptables -A forwarding_rule -i eth0.0 -o eth0.1 -j ACCEPT
iptables -A forwarding_rule -i eth0.1 -o eth0.0 -j ACCEPT
iptables -A forwarding_rule -i eth0.1 -o eth0.2 -j ACCEPT
root@router:~#
/etc/config/firewall
forward:proto=udp dport=1194:192.168.2.245:1194
forward:proto=tcp dport=25:192.168.2.12:25
forward:proto=tcp dport=443:192.168.2.12:443
forward:proto=tcp dport=1196:192.168.2.245:22
accept:proto=tcp dest=x.x.x.x dport=22 #x.x.x.x = my public ip
(Last edited by g18c on 11 Dec 2007, 06:43)