April 30, 2007

PPTP + IPTables = Accessing my media box from work

Filed under: Technology — dave @ 12:17 pm

I finally figured out what was going wrong inside my gateway (tywin) such that when i VPN’d i could only access Tywin’s resources, not those of the rest of the network. Turns out i had the following:

iptables -A FORWARD -i ${LAN} -s ${SUBNET} -j ACCEPT
iptables -A FORWARD -i ${LAN} -d ${SUBNET} -j DROP
iptables -A FORWARD -i ppp+ -s ${SUBNET} -j ACCEPT
iptables -A FORWARD -i ppp+ -d ${SUBNET} -j DROP

When i needed the following:

iptables -A FORWARD -i ${LAN} -s ${SUBNET} -j ACCEPT
iptables -A FORWARD -i ppp+ -s ${SUBNET} -j ACCEPT
iptables -A FORWARD -i ${LAN} -d ${SUBNET} -j DROP
iptables -A FORWARD -i ppp+ -d ${SUBNET} -j DROP

oops.