I'm *so* close to getting this up and running.
In what seems like my final problem, I've connected my router to a wireless network, it's picking up a dhcp address and my computer is picking up a dhcp address from the wrt54g. When I ssh in to the wrt, I can ping both routers in front of me (192.168.5.1 and 192.168.0.1 respectively - many nested routers, don't ask) and resolve and ping google.com. However, my computer which is on a dhcp address from the wrt (192.168.64.1) cannot ping beyond the wrt. The computer *does* get a gateway address (the wrt's address) with dhcp. I imagine this has something to do with certain nvram variables that I haven't set but I'm unsure of what I've missed, exactly. I'd appreciate any help. Thanks!
Topic: Routing problems through wrt54g
The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Did you following any of the tutorials that ask you to delete the S45firewall? If so, you need to restore it. ssh into the WRT and execute the two commands:
cd /etc/init.d
cp /rom//etc/init.d/S45firewall S45firewall
Nope, that definitely didn't do it. Still can't ping the router in front of me or anything outside. Any other ideas?
So the default firewall is *correct* for client mode?
I'm still having routing trouble. I don't think the wrt is serving it's role as a gateway correctly. Again, the wrt can resolve and ping google.com but my computer which is dhcp'd can't ping anything beyond the wrt. What other configuration settings might I be missing?
So the default firewall is *correct* for client mode?
I'm still having routing trouble. I don't think the wrt is serving it's role as a gateway correctly. Again, the wrt can resolve and ping google.com but my computer which is dhcp'd can't ping anything beyond the wrt. What other configuration settings might I be missing?
Hm , i think there is still a problem with the firewall , go to /etc/init.d then
rm S45firewall , then touch S45firewall , then vi S45firewall and put the following in the file:
#!/bin/sh
. /etc/functions.sh
WAN=$(nvram get wan_ifname)
WIFI=$(nvram get wifi_ifname)
IPT=/usr/sbin/iptables
for T in filter nat mangle ; do
$IPT -t $T -F
$IPT -t $T -X
done
$IPT -t filter -A INPUT -m state --state INVALID -j DROP
$IPT -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPT -t filter -A INPUT -i $WIFI -j DROP
$IPT -t filter -A FORWARD -m state --state INVALID -j DROP
$IPT -t filter -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPT -t filter -A FORWARD -i $WIFI -j DROP
$IPT -t filter -A FORWARD -o $WIFI -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
$IPT -t nat -A POSTROUTING -o $WIFI -j MASQUERADE
# -- end of file
save the file with vi and then do a chmod 755 S45firewall
reboot your wrt
If your problem is still the same as before , then it have nothing todo with the firewall in the wrt , then is there
a dns - problem i think .
give it a try and good luck
I am currently posting through my wrt - that was it!
Thanks for the help Joachim, I really appreciate it.
I am currently posting through my wrt - that was it!
Thanks for the help Joachim, I really appreciate it.
Well , always nice to hear when things work ....
If you will full understand whats going on in this file , maybe you will have a look at http://www.iptables.org
There ´s a lot of information and examples how iptables work and can be used .
Btw : great forum here , mni thanks to the people who managed and maintained Openwrt .
Have a nice day
The discussion might have continued from here.