Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: SchulzStefan on February 17, 2017, 03:54:19 PM

Title: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 03:54:19 PM
I stumbled over a configuration which was not done by me, and found under local networks two networks, which are useless.

How can I get rid of them?

Netzwerk    Subnetz-Maske    Anzahl der Hosts    Router Beschreibung    Aktion
good --> 10.164.57.0    255.255.255.0    256    192.168.0.200    Entfernen
useless --> 10.229.242.2    255.255.255.255    1         
useless --> 10.76.0.0    255.255.254.0    512    10.229.242.2    
good --> 192.168.0.0    255.255.255.0    256         

etc# grep -R '10.229.242.2' .
./proftpd.conf:  Allow from 10.229.242.2
./hosts.allow:slapd: 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./hosts.allow:sshd: 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./sysconfig/network-scripts/route-eth1:GATEWAY1=10.229.242.2
./init.d/masq:/sbin/iptables -A $NEW_local_chk -s 10.229.242.2/255.255.255.255 -j ACCEPT
./init.d/masq:    /sbin/iptables --append FORWARD -s 10.229.242.2/255.255.255.255 -d 10.164.57.0/255.255.255.0 -j ACCEPT
./init.d/masq:    /sbin/iptables --append FORWARD -s 10.164.57.0/255.255.255.0 -d 10.229.242.2/255.255.255.255 -j ACCEPT
grep: ./init.d/supervise/local: Datei oder Verzeichnis nicht gefunden
./lpd/lpd.perms:ACCEPT SERVICE=X REMOTEIP=10.229.242.2/255.255.255.255
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:        allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/admin-conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/admin-conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/admin-conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/admin-conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/admin-conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./httpd/admin-conf/httpd.conf:    allow from 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0
./squid/squid.conf:acl localsrc src 127.0.0.1 10.164.57.0/24 10.229.242.2 10.76.0.0/23 192.168.0.0/24
./squid/squid.conf:acl localdst dst 127.0.0.1 10.164.57.0/24 10.229.242.2 10.76.0.0/23 192.168.0.0/24
./rc.d/init.d/masq:/sbin/iptables -A $NEW_local_chk -s 10.229.242.2/255.255.255.255 -j ACCEPT
./rc.d/init.d/masq:    /sbin/iptables --append FORWARD -s 10.229.242.2/255.255.255.255 -d 10.164.57.0/255.255.255.0 -j ACCEPT
./rc.d/init.d/masq:    /sbin/iptables --append FORWARD -s 10.164.57.0/255.255.255.0 -d 10.229.242.2/255.255.255.255 -j ACCEPT
./samba/smb.conf:hosts allow = 127.0.0.1 10.164.57.0/255.255.255.0 10.229.242.2 10.76.0.0/255.255.254.0 192.168.0.0/255.255.255.0cd /etc

I think these are fragments of a former configuration.

Thank's for any hint.
stefan
Title: Re: SME 9.1 - unknown local networks
Post by: Stefano on February 17, 2017, 04:48:04 PM
please, post the output of

Code: [Select]
/sbin/e-smith/audittools/templates

BTW, as long as those subnets are useless, you can safly remove them fromserver-manager panel
Title: Re: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 05:19:03 PM
Here it is:

# /sbin/e-smith/audittools/templates
/etc/e-smith/templates-custom/etc/crontab/amicron_b: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/crontab/cleanfirebird: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/crontab/serverneustart: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/clamd.conf/25OLE2BlockMacros: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/smb.conf/11netbiosName: MANUALLY_ADDED, OVERRIDE
/etc/e-smith/templates-custom/etc/smb.conf/11include: MANUALLY_ADDED, OVERRIDE
/etc/e-smith/templates-custom/etc/smb.conf/11interfaces_vpn: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/cron.daily/sa_update/http_proxy: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/yum.conf/10main_proxy: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/41go-into: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/init/faxgetty.conf: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/freshclam.conf/30HTTPProxyPort: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-custom/etc/freshclam.conf/25HTTPProxyServer: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11netbiosName: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11bindInterfacesOnly: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11logFile: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11preserveCase: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11encryptPasswords: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/50homesVFS: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11passwordServer: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11guestOk: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11passwordLevel: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11caseSensitive: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/10recyclebin: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/10shadowcopy: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11strictLocking: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11nameResolveOrder: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11smbPorts: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11shortPreserveCase: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11remoteBrowseSync: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11osLevel: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11winBind: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/20printing: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/02setupWinsServer: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11hostsAllow: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11unixPasswordSync: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11displayCharSet: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11domainMaster: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11security: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11unix_extensions: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11include: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11smbPasswdFile: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11guestAccount: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/90ibays: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11oplocks: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11logonDrive: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11interfaces: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11addMachineScript: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11unixCharSet: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11defaultCase: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/50printers: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11winsServer: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11domainController: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11remoteAnnounce: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11dnsProxy: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11maxLogSize: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/10globals: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/61netlogonshare: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11winsProxy: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11serverString: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11interfaces_vpn: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11socketOptions: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11usernameLevel: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11deadtime: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/00yesno: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11pidDirectory: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11preferredMaster: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11logonScript: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/00usedb: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11logonHome: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11mapToGuest: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/61Profilesshare: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/61printerdriversshare: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/50homes: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11domainLogons: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11workgroup: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11dosCharSet: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11passdbBackend: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/11logonPath: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/22forceGroup: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/00Setup: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/90vfs: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/10recyclebin: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/10shadowcopy: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/15path: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/25printable: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/template-begin: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/20writable: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/40browseable: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/40vetoOplock: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/35cscPolicy: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/30permissions: MANUALLY_ADDED, ADDITION
/etc/e-smith/templates-user-custom/etc/smb.conf/ibays/20readonly: MANUALLY_ADDED, ADDITION

Quote
BTW, as long as those subnets are useless, you can safly remove them fromserver-manager panel
Unfortunately not. Only the first entry can be deleted with/in the panel.
Title: Re: SME 9.1 - unknown local networks
Post by: Stefano on February 17, 2017, 05:25:27 PM
first of all, your server has some (IMO) useless fragments in /etc/e-smith/templates-user-custom (all smb.conf related)

then, post the output of

Code: [Select]
db networks show
Title: Re: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 05:40:31 PM
Here it is:

# db networks show
10.164.57.0=network
    Mask=255.255.255.0
    Router=192.168.0.200
10.229.242.2=network
    Mask=255.255.255.255
    Removable=no
    VPN=lsvpnsrv
10.76.0.0=network
    Mask=255.255.254.0
    Removable=no
    Router=10.229.242.2
    VPN=lsvpnsrv
192.168.0.0=network
    Mask=255.255.255.0
    SystemLocalNetwork=yes

I agree - something with samba is wrong and seems to me as very handmade...

Edit:

For the VPN-stuff is no need...
Title: Re: SME 9.1 - unknown local networks
Post by: Stefano on February 17, 2017, 05:44:29 PM
Use
Code: [Select]
db network delprop XYZ Removable

From useless network, then you can remove via server-manager
Title: Re: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 05:52:37 PM
Stefano,

Quote
From useless network, then you can remove via server-manager

Via server-manager only the first network can be removed/deleted.
Quote
Netzwerk    Subnetz-Maske    Anzahl der Hosts    Router Beschreibung    Aktion
good --> 10.164.57.0    255.255.255.0    256    192.168.0.200    Entfernen <-- delete/remove
useless --> 10.229.242.2    255.255.255.255    1         
useless --> 10.76.0.0    255.255.254.0    512    10.229.242.2   
good --> 192.168.0.0    255.255.255.0    256

I'll try db network delprop
Title: Re: SME 9.1 - unknown local networks
Post by: Jean-Philippe Pialasse on February 17, 2017, 05:59:16 PM

10.229.242.2=network
    Mask=255.255.255.255
    Removable=no
    VPN=lsvpnsrv
10.76.0.0=network
    Mask=255.255.254.0
    Removable=no
    Router=10.229.242.2
    VPN=lsvpnsrv

those are VPN subnetworks added by a contrib probably smeserver-openvpn-s2s

from the previous output i do not see anything pointing to this contrib installed.
what is the history of the server?
SME8 ? SME9 updated from sME8 ? SME9 ?


regarding the samba templates, check them as some might conflict (OVERRIDE) an existing fragment, but most are just adding some elements, they might be part of a specific local need.

Title: Re: SME 9.1 - unknown local networks
Post by: Stefano on February 17, 2017, 06:00:47 PM
Regarding samba, the templates are in the wrong path, useless
Title: Re: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 06:11:19 PM
those are VPN subnetworks added by a contrib probably smeserver-openvpn-s2s

from the previous output i do not see anything pointing to this contrib installed.
what is the history of the server?
SME8 ? SME9 updated from sME8 ? SME9 ?


regarding the samba templates, check them as some might conflict (OVERRIDE) an existing fragment, but most are just adding some elements, they might be part of a specific local need.

@Jean-Philippe

thank you for joining.

I checked this already:

# rpm -q smeserver-openvpn-s2s
Das Paket smeserver-openvpn-s2s ist nicht installiert (not installed)

History? Good question - maybe from 8.0? Can't say for sure.

@stefano

db network delprop XYZ Removable

That's not working. I think it depends on

10.229.242.2=network
    Mask=255.255.255.255
    Removable=no
    VPN=lsvpnsrv
10.76.0.0=network
    Mask=255.255.254.0
    Removable=no
    Router=10.229.242.2
    VPN=lsvpnsrv

I agree to the s2s contrib. Besides the smb-changes... Anyway, time to get rid of useless stuff.

Is it safe to delete /etc/e-smith/templates-user-custom/etc/smb.conf/*
And how can the netwoks be removed?
Title: Re: SME 9.1 - unknown local networks
Post by: Stefano on February 17, 2017, 06:16:56 PM
Db networks
My bad
Title: Re: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 06:24:41 PM
Db networks
My bad

No problem...
Title: Re: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 06:34:44 PM
@Stefano

Worked, I kicked the networks out.

I'll delete the templates and report.
Title: Re: SME 9.1 - unknown local networks
Post by: SchulzStefan on February 17, 2017, 06:48:24 PM
Deleted the templates.

No errors so far after a signal-event post-upgrade; signal-event reboot. It seems, the box and the network is running fine.

Thank you for your help.
stefan