LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   router with mixed wired/wireless network (https://www.linuxquestions.org/questions/linux-wireless-networking-41/router-with-mixed-wired-wireless-network-260133/)

takisd 11-28-2004 08:36 AM

router with mixed wired/wireless network
 
Hi

i'm having an issue getting my newly added wireless client accessing the internet using my linux (debian) router.

the setup is as follows:

- linux router (192.168.0.11)
- multiple linux machines (192.168.0.3/2/5/16
- multiple win2k machines (192.168.0.1/4/6
- 'wired' ethernet switch
- wireless ethernet bridge (192.168.0.18)

the win2k box (192.168.0.4) is my kids machine on the other side of the house. i recently installed a wireless card in this to share the internet for them. i bought the wireless ethernet bridge (netgear wge101) and hooked this into my switch. the card in the box is a netgear wg311. i configured both the bridge and the wireless box ok and all machines can see each other with no probs (file sharing/printing etc works fine).

my router machine (192.168.0.11) is configured with a simple firewall using iptables. no wired machine (both win2k and linux) has any issues accessing the internet through this box. the wireless box however doesn't seem to be working with it.

i can ping any ip address from the wireless box, both inside and outside my network. i can ping the dns servers (as provided by my isp and as set for all machines) but i can not ping a fully-qualified domain name - ie. 216.109.112.135 will work but yahoo.com will not.

this obviously suggests an issue with the dns servers - but as i said above, it works for all boxes except this one since i installed the wireless card (it used to have a wired card - wife hated the cable running through the kitchen :) ). i even went as far as reinstalling windows on that machine as i've had networking issues in the past when changing cards ip addressess etc on windows boxes. needless to say, it didn't solve my problem.

i'm now thinking that the 'bunny hop' its doing via the wireless ethernet bridge onto the wired network and through the linux router could be the issue and perhaps a setting in my iptables setup or something. my rules files are below:

/etc/gateway.rules
Code:

# gateway.rules

/sbin/iptables -F
/sbin/iptables -t nat -F
/sbin/iptables -t mangle -F #ignore if you get an error here
/sbin/iptables -X #deletes every non-builtin chain in the table

/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT
# only if both of the above rules succeed, use
/sbin/iptables -P INPUT DROP

/sbin/iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT

/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

/sbin/iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT

/etc/init.d/gateway
Code:

# If no rules, do nothing.
[ -f /etc/gateway.rules ] || exit 0

case "$1" in
    start)   
      echo -n "Turning on packet filtering:"
            /sbin/modprobe iptable_nat #only if using iptables
            /sbin/modprobe ipt_MASQUERADE #only if using iptables
        echo 1 > /proc/sys/net/ipv4/ip_forward
        echo "."

        ;;
    stop)
        echo -n "Turning off packet filtering:"
        echo 0 > /proc/sys/net/ipv4/ip_forward
        echo "."
        ;;
    *)
        echo "Usage: /etc/init.d/gateway {start|stop}"
        exit 1
        ;;
esac
exit 0

the above was from http://newbiedoc.sourceforge.net/net...megateway.html and works great with all but the wireless box.

if anybody has any suggestions as to how i may fix this one i would really appreaciate it. i could very well be barking up the wrong tree and the issue is elsewhere altogether - if so please let me know. perhaps my whole wireless setup is plain wrong???

anything at all would be greatly appreciated.

thanks

Takis

snecklifter 11-28-2004 01:52 PM

Hi takisd,

I think this one's beyond me but how about changing the two lines:

/sbin/iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT

to

/sbin/iptables -A FORWARD -i ppp0 -o <your WLAN interface name here> -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i <your WLAN interface name here> -o ppp0 -j ACCEPT

where <your WLAN interface name here> might be wlan0 or whatever it is on your linux box. However I might be barking at you barking up the wrong tree :D
Regards
Chris


All times are GMT -5. The time now is 04:55 AM.