Vigor 130 Webinterface / PPPOE passthrough with Sophos UTM

The Vigor 130 works very well as VDSL (Vectoring) modem in connection with a Sophos UTM. Therefore the modem is configured in PPPOE pass-through mode – this way all connection related details like credentials are configured by the Sophos UTM.

Because the vigor 130 has only one Ethernet interface I always had to re-plug some network cables just to watch the DSL status via the webinterface of the „modem“.

Here are some hints on how to connect to the modem interface (using just basic routing).

In my case my LAN subnet is 192.168.23.0/24.

Place the modem into an additional Subnet

here: 192.168.24.0/24, ip of the modem: 192.168.24.2

create a static route

the vigor allows not to change the default route, but that is also not neccessary if you have only one LAN subnet.

Add an additional address to the Sophos WAN interace

In my setup the WAN interface is used as PPPOE interface for the modem, but its easy to add the modem subnet on top of it:

Thats it!

you should now be able to connect to your modem webinterface from your LAN via http://192.168.24.2/

macOS: ignore hostkeys of some hosts

To ignore hostkey checking for a subnet (i.e. when hosts got changed/provisioned/scaled often) use the following snippet:

# ~/.ssh/config

Host 172.18.*
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

But use with care, in general hostkey checking is a good idea!

macOS: add ssh-keys to agent

Since macOS sierra the system don’t adds ssh-keys to the agent automatically anymore. Add the following ssh-config file to restore the previous behaviour:

# ~/.ssh/config

Host *
    UseKeychain yes
    AddKeysToAgent yes

after connecting to a remote shell and typing the passphrase once the key/passphrase will be remembered in the macOS keychain.

Debugging NGINX location regex-rules

Nginx has unfortunately no really usable „rewrite log“ for regex location matches. But you can create your own small (but sometimes very useful) debug output:

    location ~ ^/(.*?)/(.*)  {
 
        return 200 'Debug: 1:$1  2:$2';
        add_header Content-Type text/plain;
 
        # try_files $uri /$1/index.php?$args;
    }

Nginx now simply returns the generated content:

Debug: 1:xxxxx  2:yyyyy

The add_header statement is used to force text-output if you’re debugging using a web-browser (otherwise a download would be created).

Links August 2015

A bit Elasticsearch dominated this time 😉