#1  
Old 2nd May 2010, 14:11
valies valies is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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 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
Reply With Quote
Sponsored Links
  #2  
Old 2nd May 2010, 14:34
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default

firewall issue?
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote
  #3  
Old 2nd May 2010, 14:55
valies valies is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #4  
Old 3rd May 2010, 12:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Does it work when you switch off the firewall?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 3rd May 2010, 21:22
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

Did you hit ping with the internet ip-adresses or with the dns names (or in other words, does DNS work for you?)
Reply With Quote
  #6  
Old 3rd May 2010, 21:27
valies valies is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vhosts...conf not synced to changes crypted General 50 24th April 2010 00:54
Ubuntu 8.04 updates fails & not able to update to 8.10 from CD ssk123 Installation/Configuration 5 4th June 2009 05:01
The system is currently updating the configuration files. warlock General 8 21st February 2009 18:15
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
HotSaNIC domino Tips/Tricks/Mods 23 6th November 2006 05:19


All times are GMT +2. The time now is 17:58.


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