I am running Debian Lenny on a server and on a router, both in VMware. When running apt-get update, he can't connect to the mirrors. The strange thing is that it worked before with these mirrors. sources.list (server) #http, ftp deb http://security.debian.org/ stable/updates main contrib deb ftp://ftp.be.debian.org/debian/ stable main interfaces (server) #the loopback network interface auto lo iface lo inet loopback #the primary network interface auto eth0 iface eth0 inet static address 192.168.0.3 gateway 192.168.0.1 netmask 255.255.255.224 network 192.168.0.0 broadcast 192.168.0.31 192.168.0.1 is the router's internal ip address, the external is connected with the host that is running VMware (dhcp). I can ping internet websites from the router as well as the server. So why can't I update apt? I have been searching all over the internet and tried some solutions, but they do not work... I'm hoping you guys can help me out
Maybe? I ran a simple firewall script on my router Code: #!/bin/sh PATH=/usr/sbin:/sbin:/bin:/usr/bin # # delete all existing rules. # iptables -F iptables -t nat -F iptables -t mangle -F iptables -X # Always accept loopback traffic iptables -A INPUT -i lo -j ACCEPT # Allow established connections, and those not coming from the outside iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -m state --state NEW -i ! eth1 -j ACCEPT iptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow outgoing connections from the LAN side. iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT # Masquerade. iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE # Don't forward from the outside to the inside. iptables -A FORWARD -i eth1 -o eth1 -j REJECT # Enable routing. echo 1 > /proc/sys/net/ipv4/ip_forward
Did you hit ping with the internet ip-adresses or with the dns names (or in other words, does DNS work for you?)
Yup, DNS was working succesfully. I found the problem... I was working wireless, and NAT or bridged do not always work in VMware when connecting wireless to the internet... My bad But I'm glad it's working now. Thx all for the kind replies.