You are not logged in.
Pages: 1
I'm trying to copy the network configuration of a workstation in that is currently conencted to the internet and has the following network configuration:
$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 11:22:33:44:55:66
inet addr: xx.96.79.250 Bcast: xx.96.79.255 Mask:255.255.254.0
inet6 addr: xx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1836293 errors:0 dropped:0 overruns:0 frame:0
TX packets:1230982 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2220404610 (2.2 GB) TX bytes:163794437 (163.7 MB)
where
xx.96.79.250
is accessible from the internet.
The routes available are:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 xx.96.78.1 0.0.0.0 UG 0 0 0 wlan0
xx.96.78.0 0.0.0.0 255.255.254.0 U 9 0 0 wlan0
I need a network connection in order to install archlinux on a partition (/dev/sda1). The steps I take to replicate the interface and routing information are the following:
I boot from the USB, in the GRUB menu I press tab and add the argument
ipv6.disable=1
in order to disable IPv6 (I cannot seem to be able to download packages (or any file for that matter) using wget or curl when IPv6 is enabled).
I mount the partition where I want to install arch (base and base-devel packages)
mount /dev/sda1 /mnt
then I begin cloning the interface and routing tables as per this link:
http://www.thegeekstuff.com/2009/03/ifc … interface/
ifconfig wlp4s0 up
as the default wireless interface is disabled by default.
# ifconfig wlp4s0
wlp4s0: flags=4099<UP, BROADCAST, MULTICAST> mtu 1500
ether 66:55:44:33:22:11 txqueuelen 1000 (Ethernet)
RX packets 0 ....
What does "Ethernet" reffer to above?
Set the IP, netmask and broadcast address:
ifconfig wlp4s0 xx.96.79.250
ifconfig wlp4s0 netmask 255.255.254.0
ifconfig wlp4s0 broadcast xx.96.79.255
Changing the MAC too is not helpful (the same error is given when attempting to add routes). The routing table on the machine whose configuration I want to clone is as follows:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 xx.96.78.1 0.0.0.0 UG 0 0 0 wlan0
xx.96.78.0 0.0.0.0 255.255.254.0 U 9 0 0 wlan0
After adding the ip address, the netmask and the broadcast address the routing table on the machine that I want to connect to the Internet is:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
xx.96.78.0 0.0.0.0 255.255.254.0 U 0 0 0 wlp4s0
basically, only the second entry of the routing that I want to replicate. How may I add the first?
running
# ip route add 0/0 via xx.96.78.1 dev eth0
adds the first route and now the routing table on the device that I want to replicate the network configuration on looks like:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 xx.96.78.1 0.0.0.0 UG
xx.96.78.0 0.0.0.0 255.255.254.0 U 0 0 0 wlp4s0
practically identical to the one I'm trying to impersonate. I've thought it was DNS related but I can't seem to be able to ping the gateway even though from the machine originally connected to the Internet it is possible (it doesn't filter ICMP packets). I'm trying to change the MAC as well, again, and post an update.
Edit
I've edited interfaces' wlp4s0 MAC address to the one of the machine I'm trying to impersonate:
ip link set dev wlp4s0 down
ip link set dev wlp4s0 address 11:22:33:44:55:66
ip link set dev wlp4s0 up
All network settings that I'm aware of are now set. The route had to be added again:
ip route add 0/0 via xx.96.78.1 dev wlp4s0
What am I missing here?
Edit #2
What I find really strange that it worked when IPv6 was not disabled (the pinging and the name server lookup not the downloading of packages through wget/curl). How can I check if the networking modules have been loaded during boot?
Edit #3
I've managed to connect to a hotspot using wifi-menu:
https://wiki.archlinux.org/index.php/Installation_guide
and get a valid address. Now I can ping, lookup server names but am still unable to download packages:
wget ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686/acl-2.2.52-2-i686.pkg.tar.xz
ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686/acl-2.2.52-2-i686.pkg.tar.xz
=> acl-2.2.52-2-i686.pkg.tar.xz
Resolving ftp.hosteurope.de (ftp.hosteurope.de) ... 80.237.136.138, 2a01:488:10:1::50ed:888a
Connecting to ftp.hosteurope.de (ftp.hosteurope.de)|80.237.136.138|:21...
wget hangs. Also why is there an IPv6 when resolving the server name:
2a01:488:10:1::50ed:888a
I have set the ipv6.disable kernel parameter as mentioned here:
https://wiki.archlinux.org/index.php/IPv6#Disable_IPv6
Checking the kernel parameters also confirms this:
# cat /proc/cmdline
BOOT_IMAGE=boot/x86_64/vmzlinuz archisobasedir=arch archisolabel=ARCH_201503 initrd=boot/intel_ucode.img,boot/x86_64/archiso.img ipv6.disable=1
Is this a bug?
Last edited by Sebi (2015-10-22 16:59:36)
Offline
I've managed to solve the problem by using an ethernet cable and a static network configuration such as:
# ip link set eth0 up
# ip addr add 192.168.1.2/24 broadcast 192.168.1.255 dev eth0
# ip route add default via 192.168.1.1
and adding the nameservers in /etc/resolv.conf:
nameserver <first_server>
nameserver <second_server>
and in my case using the image archlinux-2015.03.01-dual.iso ipv6 is disabled only if it is NOT the last argument added when loadinf the kernel image. In GRUB press <tab> and add the parameter ipv6.disable=1 but not as the last argument.
Now I could download files from:
ftp://ftp.hosteurope.de/mirror/ftp.arch … e/os/i686/
But I encountered numerous errors such as:
GPGME ERROR: no data
database [core/extra] not valid (invalid or corrupted database (GPG signature))
when attempting to install using pacstrap:
GPGME ERROR: no data
database [core/extra] not valid (invalid or corrupted database (GPG signature))
Removing the previous signatures:
rm -R /mnt/var/lib/pacman/sync
worked and I could finally install arch.
Offline
Pages: 1