As far as I know, Backtrack4 pre-final is not one of the distributions that can autoconfigure the Internet access, if you’re connecting through a Windows’s station Internet Connection Sharing. That’s why, a while ago I wrote some scripts to setup that for me. I’m gonna post them here, so that I can have access to them in an easy way, and so that other people could benefit from them. Maybe they’ll help you configure your distro to work with ICS:
Script 1:
import os
target_file = "/etc/network/interfacesx"
fh = open(target_file,"w")
interface_string = """
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
"""
fh.write(interface_string)
fh.close()
and script 2:
resolve_path = "/etc/resolv.conf"
fh = open(resolve_path)
lines = fh.readlines()
fh.close()
fh = open(resolve_path,"w")
for line in lines:
fh.write("#%s" % line)
fh.write("nameserver 192.168.0.1")
fh.close()
Run them in any order you please. However, to get the connection to work, you have to also run this:
/etc/init.d/networking restart