Input

book: Create a structured PDF document with headings, chapters, etc.
webpage: Specifies that the HTML sources are unstructured (plain web pages.) A page break is inserted between each file or URL in the output.
continuous: Specifies that the HTML sources are unstructured (plain web pages.) No page breaks are inserted between each file or URL in the output.
Title of the document for the front page.
Extract the first heading of the document and use it as title. If checked the title field has no effect.
The title image or HTML page. These file has to be an attachments!
Specify document version to be displayed on the title page.
Intellectual property owner of this document.
Copyright notice for this document.
Information about who and when modified the document are applied at the end.

Output

Specifies the output format.
Grayscale document  Title page
Compression :   JPEG big images 

Pagina

 
User defined page size 
Choose one of the predefined standard sizes or select user defined.
Specifies the page size using a standard name or in points (no suffix or ##x##pt), inches (##x##in), centimeters (##x##cm), or millimeters (##x##mm).
Set the target browser width in pixels (400-1200). This determines the page scaling of images.
   2-Sided   Landscape
   
   
   
Specifies the margin size using points (no suffix or ##x##pt), inches (##x##in), centimeters (##x##cm), or millimeters (##x##mm). Keep empty for default value.
Left
Middle
Right
Sets the page header to use on body pages.
Left
Middle
Right
Sets the page footer to use on body pages.

Indice

Sets the number of levels in the table-of-contents. Empty for unlimited levels.
   Numbered headings Check to number all of the headings in the document.
Sets the title for the table-of-contents. Empty for default title.
Left
Middle
Right
Sets the page header to use on table-of-contents pages.
Left
Middle
Right
Sets the page footer to use on table-of-contents pages.

Colors

Enter the HTML color for the body (background).
Enter the image file for the body (background). These file has to be an attachments!
Enter the HTML color for the text.
Sets the color of links.
Enables generation of links in PDF files.

Fonts

Set the default size of text.
Set the spacing between lines of text.
Choose the default typeface (font) of text.
Choose the default typeface (font) of headings.
Set the size of header and footer text.
Choose the font for header and footer text.
Change the encoding of the text in document.
Check to embed font in the output file.

PDF

Controls the initial viewing mode for the document.
Document: Displays only the docuemnt pages.
Outline: Display the table-of-contents outline as well as the document pages.
Full-screen: Displays pages on the whole screen; this mode is used primarily for presentations.
Controls the initial layout of document pages on the screen.
Single: Displays a single page at a time.
One column: Displays a single column of pages at a time.
Two column left/right: Display two columns of pages at a time; the first page is displayed in the left or right column as selected.
Choose the initial page that will be shown.

Security

Check to number all of the headings in the document.
 Versione stampabile   Modify
 Copy   Annotate
Specifies the document permissions.
Specifies the user password to restrict viewing permissions on this PDF document. Empty for no encryption.
Specifies the owner password to control who can change document permissions etc. If this field is left blank, a random 32-character password is generated so that no one can change the document.

Expert

Specify language to use for date and time format.
Shrink code blocks on page.
Show line numbers for code blocks.
Make spaces visable by dots (·) instead of white spaces.
Make line breaks visable by a extra character (¶) at the end.
Enable this feature if you searching for problems or intent to report a bug report

About

Version 2.4.2 (MoinMoin 1.9.7)


MoinMoin - Generate PDF document using HTMLDOC

This action script generate PDF documents from a Wiki site using
the HTMLDOC (http://www.htmldoc.org) software packages which has
to be preinstalled first.

Copy this script in your's MoinMoin action script plugin directory.

Thanks goes to Pascal Bauermeister who initiated the implementaion.
Lot of things changes since then but the idear using HTMLDOC is the
main concept of this implementation.

Please visit the homepage for further informations:
http://moinmo.in/ActionMarket/PdfAction

@copyright: (C) 2006 Pascal Bauermeister
@copyright: (C) 2006-2010 Raphael Bossek <raphael.bossek@solutions4linux.de>
@license: GNU GPL, see COPYING for details

       

Italiano English
Modifica History Actions

IsoleVPNBGP

Avvertenze

Ricordarsi di connettere il cervello prima dell'RJ45, eviterà di mandare in crash tutta la rete.

Introduzione

Lo scopo di questa guida è la configurazione di un router di frontiera per connettere reti su cui gira OLSR tramite il protocollo BGP e utilizzando Quagga. Se invece vuoi usare BGP con BIRD segui questa pagina

La base di partenza è OpenWRT Attitude Adjustment versione Scoreggione. In caso di partenza da altra versione di Openwrt andranno scaricati i pacchetti opportuni e riadattato il tutto.

La configurazione adottata prevede il link della VPN in IPV6 ma è applicabile anche in IPV4.

Il server della vpn si trova sul router al NaMex.

Cosa serve

  • Tinc
  • Quagga (con plugin olsr): pacchetti quagga , quagga-bgpd e olsrd-mod-quagga
  • OLSR (con plugin quagga)

E' possibile compilarsi una versione di OperWrt AA con già tutto dentro: Basta seguire la guida (link) poi eseguire  make config  ed andare ad abilitare i pacchetti su indicati.

Configurare Tinc

Creiamo la cartella:

#> mkdir /etc/tinc/VPNISOLE

all'interno della quale creiamo la coppia di chiavi (privata/pubblica)

#> tincd -K

creiamo la cartella:

#> mkdir /etc/tinc/VPNISOLE/hosts

dentro cui ci spostemo la chiave pubblica rinominata bgpLAMIACITTA mentre la privata (rsa_key.priv) la lasciamo lì. (Nota: il nome bgpLAMIACITTA andrà tutto in minuscolo)

Daremo copia della chiave pubblica a contatti_at_ninux.org e dentro host metteremo la chiave del server di Roma (bgproma)

Le chiavi pubbliche possono essere scaricate con il comando:

wget https://github.com/ninuxorg/pubkeysVpnIsole/archive/master.zip

se restituisce errore wget: not an http or ftp url: e non avete problemi di spazio sul device date i seguenti comandi in ordine

opkg update
opkg install wget
wget --no-check-certificate https://github.com/ninuxorg/pubkeysVpnIsole/archive/master.zip

Se invece non potete installare il pacchetto wget per problemi di spazio scaricatele su un pc e poi trasferitele oppure scaricatele sul device con

git clone https://github.com/ninuxorg/pubkeysVpnIsole.git

A questo punto da Gestione indirizzi ci assegnamo:

  • Il numero dell AS privato
  • Un indirizzo ip della rete 10.150.254.0/24

Con questi dati passiamo alla configurazione dell file /etc/config/tinc:

config tinc-net VPNISOLE
        option enabled 1
        #option log /tmp/log/tinc.VPNISOLE.log
        #option debug 3

        ## Server Configuration (tinc.conf)
        option AddressFamily any
        list ConnectTo bgproma
        option Interface vpnisole
        option Mode switch
        option Name bgpLAMIACITTA
        option Port 777
        option PrivateKeyFile /etc/tinc/VPNISOLE/rsa_key.priv

# QUESTO è il FILE HOSTS
config tinc-host bgproma
        option enabled 1
        option net VPNISOLE
        list Address 176.62.53.98    #questo è l'ipv4 del server de Roma
        option PMTUDiscovery yes
        option Port 777
        option Subnet 10.150.254.0/24

sempre nella cartella /etc/tinc/VPNISOLE creiamo due script utilzzando l'ip preso da gestione indirizzi:

tinc-up:

ip link set dev $INTERFACE up
ip addr add 10.150.254.X/24 brd 10.150.254.255 dev  $INTERFACE  #Mettere l'ip corretto
iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

tinc-down:

ip link set dev $INTERFACE down
iptables -D FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

che rendiamo eseguibili:

#> chmod +x tinc-*

Prima di provarla è necessario modificare il policy routing come descritto in basso. Senza tale modifica NF1C.

Se la VPN funziona dovremmo riuscire a pingare il server di Roma:

#> ping 10.150.254.4

Configurare Quagga

Il meccanismo di funzionamento è il seguente:

  • Quagga prende le rotte locali e le annuncia al peer
  • Quagga prende le rotte apprese dall'istanza locale di olsr e le manda al peer
  • Quagga prende le rotte apprese dal peer e dall'istanza locale di OLSR e le scrive nella tabella di routing del kernel

bgpd.conf

questo file si trova in /etc/quagga

hostname bgpLAMIACITTA
password lamiapassword1
enable password lamiapassword2
!
access-list vty permit 127.0.0.0/8
access-list vty deny any
!
line vty
 access-class vty
!
router bgp IL_MIO_AS_NUMBER
 bgp router-id IL_MIO_IP
 redistribute connected
 redistribute olsr
 neighbor 10.150.254.4 remote-as 64512
 neighbor 10.150.254.4 description BGP Roma
 neighbor 10.150.254.4 route-map FILTERIN in
 neighbor 10.150.254.4 route-map FILTEROUT out
!
ip prefix-list FILIN seq 10 deny 10.11.12.0/25 le 32
ip prefix-list FILIN seq 20 deny 150.217.0.0/16 le 32
ip prefix-list FILIN seq 30 deny 176.62.53.0/24 le 32
ip prefix-list FILIN seq 41 deny 10.150.254.0/24 le 32
ip prefix-list FILIN seq 42 deny 10.X.X.X/16 le 32
ip prefix-list FILIN seq 43 deny 172.16.X.X/24 le 32
ip prefix-list FILIN seq 70 permit any
!
ip prefix-list FILOUT seq 41 deny 10.150.254.0/24 le 32
ip prefix-list FILOUT seq 70 permit any
!
route-map FILTERIN permit 10
 match ip address prefix-list FILIN
!
route-map FILTEROUT permit 10
 match ip address prefix-list FILOUT
!
route-map FILTER deny 50
!

Le informazioni di AS number e Ip presi da gestione indirizzi sono utilizzati in questo file. Le direttive "redistribute" non fanno altro che mandare al peer le rotte locali (connected) e quelle apprese via olsr (olsr). La prima serve perchè l'hna annunciato localmente non viene preso in considerazione. Quando si parla di rotte locali in un sistema multitable si intende quelle presenti nella tabella main (ip r s t main).

Se nella nostra tabella abbiamo delle rotte che non annunciamo il olsr e non vogliamo che vadano in giro per le isole le inseriamo nella lista FILOUT. Questo è il caso dalla 10.150.254.0/24 che è la sottorete della VPN e non ha senso annunciare anzi può essere dannosa in quanto una volta arrivata potrebbe far cadere la connessione vpn che l'ha trasportata (autodistruzione).

Stesso discorso per le reti che si "apprendono" dall'esterno. In questo caso decide di filtrare in ingresso:

  • 10.11.12.0/25 che è la sottorete anycast romana
  • 150.217.0.0/16 non lo so
  • 176.62.53.0/24 gli indirizzi pubblici di Roma, essendo pubblici è inutile routarli via VPN
  • 10.150.254.0/24 la sottorete della vpn
  • 10.X.X.X/16 la classe di ip che sono stati assegnati alla mia isola
  • 172.16.X.X/24 la classe di ip che sono stati assegnati alla mia isola

Per ottimizzare il le tabelle di routing conviene aggregare le tabelle di routing. (Parte da spiegare meglio)

! aggregato backbone
network 172.16.xx.0/24

!aggregato lan
aggregate-address 10.xx.0.0/16

! filtra tutte le /32
ip prefix-list FILOUT seq 22 deny 0.0.0.0/0 ge 32

zebra.conf

questo file si trova in /etc/quagga

password lamiapassword1
table 111
!
access-list vty permit 127.0.0.0/8
access-list vty deny any
!
line vty
 access-class vty!
!
route-map NINUX_PRIVATE permit 10
set src 10.x.x.x
ip protocol bgp route-map NINUX_PRIVATE

Unica cosa interessante di questo file è che diciamo in che tabella del kernel mettere le rotte apprese, ovvero la 111.

Il set src 10.x.x.x mettere l'ip privato della router in modo tale che gli indirizzi in tabella non abbiano l'indirizzo dellla VPN la cui barra viene filtrata.

Configurare Olsr

questo file è in /etc/config/olsr. Oltre alla configurazione standard che qui non riporto, bisogna aggiungere il caricamento del plugin di quagga:

config LoadPlugin
        option library 'olsrd_quagga.so.0.2.2'
        option Redistribute 'bgp'
        option ExportRoutes  'only'
        option Distance '100'
        option LocalPref 'false'
        option SockPath '/tmp/run/quagga/zserv.api'
        option Version '2'

Modifiche a rc.local di Scooreggione

Rispetto al file rc.local fornito di default con scooreggione sono state apportate le diverse modifiche:

  • Sono state eliminate le policy sulle subnet 176.62.53.0, Per un'isola ninux sono pubblici come tutti altri e devono andare verso la default
  • è stata aggiunta una lookup sulla main per la 10.150.254.0/24 a maggior preferenza in quanto match la 10.0.0.0/8 mandando la rete vpn in blackhole.

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

#110 Local routes
#111 RtTable
#112 RtTableDefault
#113 Special Table for /1
#114 blackholes table

#Copy local routes only from table main 254 to table 110
ip route show table 254 | grep -Ev ^default | grep -Ev ^blackhole | while read ROUTE ; do
MASK=`echo "${ROUTE}" | awk '{print $1}' | awk -F/ '{print $2}'`
if [ "$MASK" -ne 16 ] ; then
ip route add table 110 $ROUTE
fi
done

#First evaluate local routes
ip rule add from all lookup 110 pref 3
#La rotta della vpn sta nella main
ip rule add to 10.150.254.0/24 table main pref 3

#Private routes to OLSR table
ip rule add to 10.0.0.0/8 table 111 pref 4
ip rule add to 172.16.0.0/12 table 111 pref 4
ip rule add to 192.168.0.0/16 table 111 pref 4


#Evaluate blackholes
ip rule add from all table 114 pref 5

#Lookup default route first from user and then from OLSR
ip rule add from all lookup 254 pref 7
ip rule add from all lookup 112 pref 8

#Blackhole private aggregates
ip route add blackhole 10.0.0.0/8 table 114
ip route add blackhole 172.16.0.0/12 table 114
ip route add blackhole 192.168.0.0/16 table 114


exit 0

Misc

In questa sezione un po di tips utili

IPV6 e Radvd

Con scooreggione v4 avevo il problema che l'interfaccia lan non mi prendeva l'ipv6 dal router che riceveva la delega della /64 dal provider. Il problema è stato risolto così:

echo 0 > /proc/sys/net/ipv6/conf/all/forwarding

e reso definitivo andando a modificare il file /etc/sysctrl.conf

Topologia e linee verdi sul mapserver

Nonostante le nostre rotte arrivino al map server via VPN esso non ci disegnerà il link perchè BGP propaga le rotte e non la topologia OLSR.

12/3/2015: Il Map server è presente nella sottorete dei BGP. Basta esportare la topologia la porta 2006 solo nella vpn e avvisare Clauz di aggiungervi alla lista. Il map server (v1) ha ip 10.150.254.8

Un modo per permettere al mapserver di disegnare i link è il seguente:

  • Avere un account su un servizio di DNS per ip dinamici (Servizio DNS molto costoso)

  • Forwardare la porta 2006 del router olsr verso internet dal proprio router

Test della configurazione

Colleghiamoci al router BGP:

telnet 127.0.0.1 bgpd

mettiamo la password e una volta dentro digitiamo:

bgpLAMIACITTA> show ip bgp summary
BGP router identifier 10.150.254.X, local AS number 645XX
RIB entries 1169, using 82 KiB of memory
Peers 1, using 2524 bytes of memory

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.150.254.4    4 64512     152      95        0    0    0 01:28:40      640

Total number of neighbors 1

dove vediamo che l'AS 64512 (che è Roma) ci ha mandato 640 rotte. Usciamo da bgp con il comando exit e andiamo a vedere se le rotte sono nel kernel:

#> ip r s t 111