Hi all
maybe one of you guys can help?
I have an openwrt Kamikaze 8.09 running on a wrt45gl v.1.1 hardware and I want to use it as firewall/pppoe gateway/router for my network.
here is my network setup:
config 'switch' 'eth0'
option 'vlan0' '0 5*'
option 'vlan1' '1 5'
option 'vlan2' '2 5'
option 'vlan3' '3 5'
option 'vlan4' '4 5'
option 'vlan5' '4 5'
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'inside'
option 'ipaddr' '192.168.100.254'
option 'netmask' '255.255.255.0'
option 'proto' 'static'
option 'ifname' 'eth0.0'
config 'interface' 'outside'
option 'proto' 'static'
option 'ifname' 'eth0.4'
option 'netmask' '255.255.255.0'
option 'ipaddr' '192.168.1.254'
config 'interface' 'pppoe'
option 'proto' 'pppoe'
option 'mtu' '1492'
option 'keeplaive' '5'
option 'ifname' 'eth0.5'
option 'options' 'defaultroute persist maxfail 0'
option 'username' '***************'
option 'password' '*****************'
config 'route'
option 'interface' 'inside'
option 'target' '192.168.101.0'
option 'netmask' '255.255.255.0'
option 'gateway' '192.168.100.253'
my iptables rules are as follows:
# kill all current rules
/usr/sbin/iptables -F
/usr/sbin/iptables -t nat -F
/usr/sbin/iptables -X
/usr/sbin/iptables -t nat -X
#
# set up our rules
/usr/sbin/iptables -N firewall
/usr/sbin/iptables -A firewall -p icmp -i any -o any -j ACCEPT
/usr/sbin/iptables -A firewall -m state --state ESTABLISHED,RELATED -j ACCEPT
/usr/sbin/iptables -A firewall -m state --state NEW -i ! eth0.4 -j ACCEPT
/usr/sbin/iptables -A firewall -m state --state NEW -i ! ppp0 -j ACCEPT
/usr/sbin/iptables -A INPUT -m state --state INVALID -i ppp0 -j DROP
/usr/sbin/iptables -A firewall -j DROP
/usr/sbin/iptables -A INPUT -j firewall
/usr/sbin/iptables -A FORWARD -j firewall
/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 # kill all current rules
/usr/sbin/iptables -F
/usr/sbin/iptables -t nat -F
/usr/sbin/iptables -X
/usr/sbin/iptables -t nat -X
#
# set up our rules
/usr/sbin/iptables -N firewall
/usr/sbin/iptables -A firewall -p icmp -i any -o any -j ACCEPT
/usr/sbin/iptables -A firewall -m state --state ESTABLISHED,RELATED -j ACCEPT
/usr/sbin/iptables -A firewall -m state --state NEW -i ! ppp0 -j ACCEPT
/usr/sbin/iptables -A INPUT -m state --state INVALID -i ppp0 -j DROP
/usr/sbin/iptables -A firewall -j DROP
/usr/sbin/iptables -A INPUT -j firewall
/usr/sbin/iptables -A FORWARD -j firewall
/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
#
# start packet forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
}
#
# start packet forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
Routing table is like this:
Destination Gateway Genmask Flags Metric Ref Use Iface
xxx.yyy.zzz.www 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.0
192.168.101.0 192.168.100.253 255.255.255.0 UG 0 0 0 eth0.0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.4
0.0.0.0 aaa.bbb.ccc.ddd 0.0.0.0 UG 0 0 0 ppp0
What I need to be able to do is:
connect to the xDSL modem on 192.168.1.1 (via eth0.4) for management purposes
run a pppoe session to the same box (via eth0.5)
interfaces eth0.1 eth0.2 and eth0.3 are reseved form DMZ's that will be added later, when I get my routing working.
At the moment pppoe just works, and that good, but I cannot ping or route to 192.168.1.0/24 network at all regardless, of the state of pppoe interface, etc. Routing to 192.168.101.0/24 network works just fine.
is this a vlan related issue? Can any one point out what I can do to fix this?
Cheers
Tomasz
After some investigation it appears that openwrt firmware will NOT let me run a fucntioning pppoe and an standard ethernet data link over the same physical switch port. Even if the intefcaes for that are defined in diffrent vlans.
This is very annoying because my previous firewall box (UltraSPARC5 + debian) allowed me to do that.
Can anyone (a developer perhaps) enlighten me as to why? perhaps I am not configuring the pppoe correctly?
(Last edited by yasutani on 19 Apr 2009, 17:00)