[Quick Guide] Optic Fiber - Get as many external IPs as you want!

Discussion in 'eBooks, PDFs, Videos & MP3s' started by TCB13, 27 Jan 2015.

  1. TCB13

    TCB13 Be great

    Joined:
    24 Jun 2012
    Messages:
    96
    Likes Received:
    54
    Hello guy, I've been a bit off the forum, mainly due to work, but I wanted to share a fast guide with you today.
    As some of you know, I usually do pentesting and I recently discovered a small trick that can be useful for anyone with fiber optic connections at home. Sometime it's useful to change or IP or even have multiple external IP addresses assigned to you at the same time (...). This is possible, how?

    Most optic fiber ISPs give you an IP by looking at the MAC address of the router/device connected to the ONT (the device between the optic fiber and your router). Every device owns a different IP and as long as it the same device it will keep it's IP. However, this ISPs will also provide you with an infinite number of addresses as long as the the MAC address changes.

    So, to easiest way to have a different temporary IP address (to download a file from a limited site or something similar...) is do disconnect your router from the ONT device and connect your computer (running linux) directly to it. Then we need to setup the networking:

    1. Fiber optic IPSs provide multiple services over the fiber optic network and they do it by diving it into VLANs (virtual lans), this virtual lans are basically the same as multiple ethernet adapters inside a single cable, every ISP has different values for those, but you can easily find them on google by "ISP name vlan config" or "replace ISP name router with your own". It's a number like 10, 100, or even 5000 (the last one for the guys in Malaysia, @Crackerz).
    2. Disconnect your router from the ONT device and connect your computer
    3. Setup your networking, edit file /etc/network/interfaces and change...
    Code:
    Select All
    auto eth1.100 iface eth1.100 inet dhcp
    Please note... eth1 is your network interface, and the .100 is the number of the VLAN I told you before you needed to get.
    Then issue: service networking restart

    At this point, if you check your networking via ifconfig, you should see an external IP assigned to the en1.100 network interface.

    If you need a new IP, different from the one you got right now, you can issue the following commands:
    Code:
    Select All
    ifconfig eth1.100 down ifconfig eth1.100 hw ether 70:70:70:70:70:01 ifconfig eth1.100 up dhclient -v eth1.100
    Note that 70:70:70:70:70:01 is a fictitious MAC address you're giving yourself in order to trick the ISP into giving you a new IP address. If you run the commands again but with 70:70:70:70:70:02 you'll get another IP and so on...

    Side Note:

    Some IPS relaying on a old infracture may require PPPoE login in order the access their network. There are multiple guides on how to setup PPPoE on a network interface, but the important part is that you should set the PPPoE on the VLAN interface eth1.100 (for instance) and not on the physical eth1 interface. Don't fall for this mistake.

    For advanced usage only:

    Some ISPs will even allow you to own multiple IP addresses on multiple virtual interfaces at the same time!! (don't ask me how to use this, I'm just reporting, it's for advanced users). For this you can issue the following commands:
    Code:
    Select All
    ip link add link eth1.100 name vir1 address 70:70:70:70:70:03 type macvlan mode bridge dhclient -v vir1
    and the ISP will provide you with a IP on that interface. Don't forget the change "vir1" (the name of the virtual interface) and the MAC Address. Don't try to get two interface with the same MAC.

    Enjoy!
     
    #1 TCB13, 27 Jan 2015
    Last edited: 27 Jan 2015

Share This Page

Loading...