HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   apt-get update fails (

valies 2nd May 2010 15:11

apt-get update fails
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 stable/updates main contrib
deb stable main

interfaces (server)
#the loopback network interface
auto lo
iface lo inet loopback

#the primary network interface
auto eth0
iface eth0 inet static
broadcast 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 :confused:

sjau 2nd May 2010 15:34

firewall issue?

valies 2nd May 2010 15:55

Maybe? I ran a simple firewall script on my router




# 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

falko 3rd May 2010 13:38

Does it work when you switch off the firewall?

Ben 3rd May 2010 22:22

Did you hit ping with the internet ip-adresses or with the dns names (or in other words, does DNS work for you?)

valies 3rd May 2010 22:27

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 :o But I'm glad it's working now. Thx all for the kind replies.

All times are GMT +2. The time now is 10:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.