Re: Setting up a local DNS server but clients that use it can't access the internet

2018-02-24 Thread Aero Maxx
Is there anything I can do to make it work with dnssec-validation set to
auto?

If I change the forwarding ip addresses to the google public dns servers it
works with auto, but the other virgin media address for dns don't work with
auto, why is that, have they configured something different to google?

On 24 February 2018 at 13:16, Aero Maxx <aero.max...@gmail.com> wrote:

> On 24 February 2018 at 12:56, Reco <recovery...@gmail.com> wrote:
>
>> So, a SERVFAIL. That's curious, to say the least.
>>
>> OK, let's try this:
>>
>> 1) Put "dnssec-validation no;" in your named.conf.options.
>>
>> 2) Restart (as in - stop then start) BIND.
>>
>> 3) Execute "dig in a debian.org @127.0.0.1" once more.
>>
>> 4) Please provide BIND logs from its last restart.
>>
>
> I made those changes and apt-get update now works.
>
> Have attached the output of the commands, and my syslog file as I didn't
> have a log file specifically for bind9.
>
>
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>  Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
> <#m_4849929349726157538_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>


Re: Setting up a local DNS server but clients that use it can't access the internet

2018-02-24 Thread Aero Maxx
On 24 February 2018 at 12:36, Reco  wrote:

> Ok, what about this (again, run it from the malfunctioning DNS, root is
> needed for the second and third command):
>
> dig in a debian.org @127.0.0.1
>
> ss -nplu
>
> iptables-save
>

I've attached the output of those commands also now.


> > As previously mentioned each server and client has 2 network cards, one
> > which provides internet access to the client or server, and the other
> > provides internal services that are on the local network after the
> > firewall, the DNS server shouldn't be accessible by any clients or
> servers
> > that are on the internet/external side of my router/firewall.
>
> You're talking about inbound connections, but your problem may lie with
> the outbound ones.
>

Oh right I see.


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
root@debian:~# dig in a debian.org @127.0.0.1

; <<>> DiG 9.10.3-P4-Debian <<>> in a debian.org @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 22821
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;debian.org.IN  A

;; Query time: 336 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Feb 24 12:38:39 GMT 2018
;; MSG SIZE  rcvd: 39

root@debian:~# ss -nplu
State   Recv-Q Send-Q Local Address:Port
Peer Address:Port
UNCONN  0  0  10.0.2.20:53  
   *:*   
users:(("named",pid=1193,fd=515))
UNCONN  0  0   192.168.0.61:53  
   *:*   
users:(("named",pid=1193,fd=514))
UNCONN  0  0  127.0.0.1:53  
   *:*   
users:(("named",pid=1193,fd=513))
UNCONN  0  0  *:68  
   *:*   
users:(("dhclient",pid=456,fd=6))
UNCONN  0  0 :::53  
  :::*   
users:(("named",pid=1193,fd=512))
root@debian:~# iptables-save
root@debian:~#


Re: Setting up a local DNS server but clients that use it can't access the internet

2018-02-24 Thread Aero Maxx
On 24 February 2018 at 11:37, Reco  wrote:

> Ok, that actually gives us something.
>
> First things first, Virgin Media uses different nameservers, according
> to the RIPE, at least. They are ns[1-4].virginmedia.net.
>
> Second, these cache[12].service.viginmedia.net you're trying to use as
> forwarders may or may not be operational.
> A couple of quick tests should clarify it (run it from the malfunctioning
> DNS):
>
> dig in a debian.org @194.168.4.100
> dig in a debian.org @194.168.8.100


The above IP addresses are the ones that debian found by itself when I
installed it, and were already in the resolv.conf file prior to me editting
it.

Have attached the output of the above commands.

> Is there a reason as to why the root DNSes aren't accessible to my BIND?
>
> You forgot to put your DNS server at DMZ.
> They block udp:53 and tcp:53 at Virgin Media.
> Someone at *your* premises does the same.


As previously mentioned each server and client has 2 network cards, one
which provides internet access to the client or server, and the other
provides internal services that are on the local network after the
firewall, the DNS server shouldn't be accessible by any clients or servers
that are on the internet/external side of my router/firewall.



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
root@debian:~$ dig in a debian.org @194.168.4.100

; <<>> DiG 9.10.3-P4-Debian <<>> in a debian.org @194.168.4.100
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30672
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;debian.org.IN  A

;; ANSWER SECTION:
debian.org. 28  IN  A   5.153.231.4
debian.org. 28  IN  A   149.20.4.15
debian.org. 28  IN  A   130.89.148.14
debian.org. 28  IN  A   128.31.0.62

;; Query time: 17 msec
;; SERVER: 194.168.4.100#53(194.168.4.100)
;; WHEN: Sat Feb 24 11:55:05 GMT 2018
;; MSG SIZE  rcvd: 103

root@debian:~$ dig in a debian.org @194.168.8.100

; <<>> DiG 9.10.3-P4-Debian <<>> in a debian.org @194.168.8.100
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25990
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;debian.org.IN  A

;; ANSWER SECTION:
debian.org. 20  IN  A   128.31.0.62
debian.org. 20  IN  A   5.153.231.4
debian.org. 20  IN  A   149.20.4.15
debian.org. 20  IN  A   130.89.148.14

;; Query time: 17 msec
;; SERVER: 194.168.8.100#53(194.168.8.100)
;; WHEN: Sat Feb 24 11:55:14 GMT 2018
;; MSG SIZE  rcvd: 103

Re: Setting up a local DNS server but clients that use it can't access the internet

2018-02-24 Thread Aero Maxx
On 24 February 2018 at 10:26, Reco  wrote:

> Hi.
>
> Please don't use pastebin for this. This list archives should contain
> not only the solution, but a clear problem statement also.
>
> So, following "show, don't tell principle":
>
> # dig in a debian.org +trace +recurse
>
> ; <<>> DiG 9.10.3-P4-Debian <<>> in a debian.org +trace +recurse
> ;; global options: +cmd
> .   360 IN  NS  A.ROOT-SERVERS.NET.
> .   360 IN  NS  J.ROOT-SERVERS.NET.
> .   360 IN  NS  L.ROOT-SERVERS.NET.
> .   360 IN  NS  C.ROOT-SERVERS.NET.
> .   360 IN  NS  M.ROOT-SERVERS.NET.
> .   360 IN  NS  E.ROOT-SERVERS.NET.
> .   360 IN  NS  I.ROOT-SERVERS.NET.
> .   360 IN  NS  K.ROOT-SERVERS.NET.
> .   360 IN  NS  G.ROOT-SERVERS.NET.
> .   360 IN  NS  F.ROOT-SERVERS.NET.
> .   360 IN  NS  B.ROOT-SERVERS.NET.
> .   360 IN  NS  H.ROOT-SERVERS.NET.
> .   360 IN  NS  D.ROOT-SERVERS.NET.
> couldn't get address for 'A.ROOT-SERVERS.NET': failure
> couldn't get address for 'J.ROOT-SERVERS.NET': failure
> couldn't get address for 'L.ROOT-SERVERS.NET': failure
> couldn't get address for 'C.ROOT-SERVERS.NET': failure
> couldn't get address for 'M.ROOT-SERVERS.NET': failure
> couldn't get address for 'E.ROOT-SERVERS.NET': failure
> couldn't get address for 'I.ROOT-SERVERS.NET': failure
> couldn't get address for 'K.ROOT-SERVERS.NET': failure
> couldn't get address for 'G.ROOT-SERVERS.NET': failure
> couldn't get address for 'F.ROOT-SERVERS.NET': failure
> couldn't get address for 'B.ROOT-SERVERS.NET': failure
> couldn't get address for 'H.ROOT-SERVERS.NET': failure
> couldn't get address for 'D.ROOT-SERVERS.NET': failure
> dig: couldn't get address for 'A.ROOT-SERVERS.NET': no more
>
> And that output is enough to tell you this:
>
> 1) Your nameserver tries to do the right thing - to do recursion.
>
> 2) Your named.conf apparently lacks "forwarders" section, so the only
> thing that BIND can do here - is to query root DNSes.
>
> 3) And root DNSes aren't accessible to your BIND.
>
> In conclusion, your setup is clearly broken, you need to fix it.
>
> Reco
>
>
Ok well I wasn't aware pastebin wasn't allowed, I was wary of pasting a
huge wall of text from all the commands and the output of the files I was
asked for right into an email.

The output sadly told me nothing as I didn't understand it.

My named.conf.options file does have a "forwarders" section in it.

options {
directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

forwarders {
194.168.4.100;
194.168.8.100;
};


//
// If BIND logs error messages about the root key being expired,
// you will need to update your keys.  See
https://www.isc.org/bind-keys

//
dnssec-validation auto;

auth-nxdomain no;# conform to RFC1035
listen-on-v6 { any; };
};

Is there a reason as to why the root DNSes aren't accessible to my BIND?

Yes I am aware I need to fix it, hence the reason why I posted in the first
place, do you have any idea as to what needs to be fixed? as I have no idea
what I should do from here.


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Re: Setting up a local DNS server but clients that use it can't access the internet

2018-02-24 Thread Aero Maxx
Firstly thank you all very much for the replies, and sorry for the vague
information, that wasn't intentional I didn't know what you would need and
also I wasn't aware of the commands you ask for the output from.

On 23 February 2018 at 18:06, Reco  wrote:

> Please invoke this on one of the problematic client hosts:
>
> dig in a debian.org +trace +recurse
>
> dig in a google.com +trace +recurse


Output from the dig commands: https://pastebin.com/7CDMit1R

On 23 February 2018 at 18:09, Roberto C. Sánchez  wrote:

> What is the output of 'ip addr ls' and 'ip route ls' on one of the Linux
> clients? What are the contents of /etc/resolv.conf and /etc/hosts on one
> of the Linux clients? What are the contents of /etc/bind/named.conf*
> (that is, all the configuration files with names starting with
> /etc/bind/named.conf)? What is the actual output where you see errors?
> For example, if nslookup fails, please provide the complete command-line
> and the complete error output. Same for apt-get or any other thing that
> is failing.
>

Output from 'ip addr ls': https://pastebin.com/rU27NbhQ
Output from 'ip route ls': https://pastebin.com/NGZeYuBD
Contents of '/etc/resolv.conf': https://pastebin.com/NtvT1Gf0
Contents of '/etc/hosts': https://pastebin.com/hA0Gm00p
Contents of '/etc/bind/named.conf': https://pastebin.com/qFQQWbLB
Contents of '/etc/bind/named.conf.default-zones':
https://pastebin.com/jmNEz1Mm
Contents of '/etc/bind/named.conf.options': https://pastebin.com/GUevb0t7
Contents of '/etc/bind/named.conf.local': https://pastebin.com/t85npbxG

Contents of '/etc/bind/db.nhs2.uk': https://pastebin.com/tk2P9C1S
Contents of '/etc/bind/db.10': https://pastebin.com/tLeEBsRR

Output from 'apt-get update' showing errors: https://pastebin.com/xfeUhG2p
Output from nslookup commands: https://pastebin.com/X6iyYByj
Contents of '/etc/network/interfaces': https://pastebin.com/Z5UtC3rs

Output from 'ifconfig': https://pastebin.com/vGABwGt7

On 23 February 2018 at 18:26, Greg Wooledge  wrote:

> What domain name did you choose for your local area network?
>

Domain name: nhs2.uk


> What software are you using on the DNS server?  How is it configured?
>

Software: Bind for DNS - Configured as per the instructions here:
https://help.ubuntu.com/lts/serverguide/dns-configuration.html


> Did you use a combined nameserver + recursive resolver on a single
> host, or did you separate the functionality?
>

I am not sure, I think I have only configured a nameserver, I basically
just followed the instructions in the ubuntu dns configuration guide.


> Plus, all the other excellent questions others have already given.
> In short, you must give details.  All of the details.


Thank you,


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Setting up a local DNS server but clients that use it can't access the internet

2018-02-23 Thread Aero Maxx
I was wondering if someone would be as so kind to point me in the right
direction for what I am trying to achieve.

Basically I have local clients that are a mixture of windows and linux,
these clients need to be able to access the internet for updates and so on,
but to also access services that are on the local network by a hostname
that has been setup correctly I believe on the local DNS server.

The clients are able to use the dns server when specified as a nameserver
on linux in the resolv.conf file and as a dns server on windows, I have
only tested this with the linux clients at present but when they are using
the local dns server as the sole name server the linux clients can do an
nslookup on domains such as google for example, and get google's ip
address.  So it would seem as that internet access works, but when trying
to do updates from apt-get this fails as ***.debian.org fails to resolve to
an ip address, and nslookup debian.org doesn't work, no ip address is
returned.

The local domain and subdomains that are setup on the local dns server do
work, the clients are able to access the correct services, in order for the
linux clients to do updates the isp name servers have to be put back in
resolv.conf then updates work, and then the file has to be changed back to
the local dns server once again.

I have followed the ubuntu guide at the link below, and yes I realise I am
not using ubuntu and using debian instead, but as these are both debian
like and/or based distro's I didn't think it would be an issue.

https://help.ubuntu.com/lts/serverguide/dns-configuration.html

I am not sure if this is relevant, but each server and client has two
network cards the first network card is for internet access only and DHCP
addresses are provided to that card, the other network card is access to a
vlan that the servers and other clients are on, no internet access is
possible through the second network card.  This setup isn't something that
can be changed and so the solution would need to work with this setup.

If someone is able to point in the right direction I would be ever so
grateful!

Thank you.


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Re: Security updates mirror

2016-04-18 Thread Aero Maxx

On 18/04/2016 15:00, Mark Fletcher wrote:



On Mon, Apr 18, 2016 at 2:42 AM Aero Maxx <aero.max...@gmail.com 
<mailto:aero.max...@gmail.com>> wrote:


Is this of any help to you ?

https://www.debian.org/mirror/list-full#JP




Thanks, yes it is. I don't recall seeing the security updates listed 
in there last time I looked (the very last Japan mirror includes them) 
-- that must be the server I was remembering.


Am I reading that right, that it says I shouldn't be using 
ftp.jp.debian.org <http://ftp.jp.debian.org> as a source, but rather 
hard-coding in one of the mirrors? What does that mean? I've been 
using ftp.jp.debian.org <http://ftp.jp.debian.org> for years, have i 
been naughty somehow?


Thanks for your help.

Mark


No problem.

I've read that link a few times, and I am not sure what you've seen that 
seen that makes you think that, I can only think its the below bit of 
text, but I think this is only for those who are wanting to create a 
mirror perhaps, but I am not 100% sure.


That being said however I think it's perfectly fine to use 
ftp.jp.debian.org, mainly due to the fact that the debian iso all have 
ftp.uk.debian.org as the primary mirror for the net install cd's, and 
this is all I ever use, and ftp.jp.debian.org is also a primary debian 
mirror. See http://ftp.jp.debian.org/debian/README.mirrors.html


I don't think you've been naughty at all.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: Security updates mirror

2016-04-17 Thread Aero Maxx

On 17/04/2016 12:36, Mark Fletcher wrote:

Hello

A while back I remember seeing an announcement about a 
security.debian.org  mirror in Japan, but 
I've misplaced the announcement. Doing aptitude update when you are in 
Japan and regular old security.debian.org  
is in your sources.list is a slow process (works fine, but slow) -- if 
there is a Japan mirror and I didn't just dream that, I'd like to use 
it. I am of course using a Japan mirror of the regular repository already.


Does anyone know where I can find a list of the security.debian.org 
 mirrors?


Thanks

Mark


Is this of any help to you ?

https://www.debian.org/mirror/list-full#JP


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: cannot use debian because of too many problems...

2016-04-16 Thread Aero Maxx

On 16/04/2016 20:49, Bob Holtzman wrote:

On Sat, Apr 16, 2016 at 09:22:24AM +, Arnoud van der Veer wrote:


Too many problems for me I must say! For a normal pc user this is not a good
alternative for using Windows. Windows costs money, yes, but I have never, ever
encountered so many problems on a pc running on Windows in comparison to a pc
running on Debian! This is more for a programmer; not for a user who has to get
some work done in a reliable manner!

How would you account for the many thousands of users who are
successfully using debian and getting "work done in a reliable
manner"? Believe me they're not all programmers. I'm a living example.



Debian is not all that bad, if your finding it so hard why noy give 
ubuntu a try, it's still debian based and perhaps you can come

back to debian when you are a bit more clued up on how it works and so on.

Also I'm in the processing of switching from fedora to debian, but not 
because I don't like fedora as I do I just find that I seem
to need to upgrade between version quite often and debian seems to 
support their versions a lot longer, and don't release new
versions that often, this is purely based on the fact that debian is 
still in single digits.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: My script almost works but spams the terminal its launched from if useing dash.

2016-04-16 Thread Aero Maxx

On 16/04/2016 17:45, Gene Heskett wrote:

On Saturday 16 April 2016 12:01:28 Aero Maxx wrote:


On 16/04/2016 16:23, Gene Heskett wrote:

But when I run it with dash, it doesn't seem to work right, and
spams the terminal with its error messages.  One that appears to
kill its function is the bashism of using [[ ]] to surround string
variables, reported like this:
bin/mailwatcher: 64: bin/mailwatcher: [[: not found
bin/mailwatcher: 70: bin/mailwatcher: [[: not found
bin/mailwatcher: 77: bin/mailwatcher: [[: not found

dash isn't the same as bash, as it has a limited set of instructions
or commands it can do.

But I too would be interested to know if it is possible to get it to
work in dash, I don't believe it is, but I am happy to be corrected
or proved wrong.


And finally, once its working with either shell, how do I shut it up
totally?  Even the above command line launch fails as it outputs to
that shell, a newline for every incoming mail which gradually
scrolls any output that was on-screen, offscreen without leaving a
prompt until I tap the return key to restore it.

Also isn't the command you are running supposed to be as follows ?


bin/mailwatcher 2>&1 > /dev/null &


Is the space you inserted into my line between the > and the /dev/null a
game changer? In either bash or dash?  Its been a while since I last
read the bash docs, but I don't recall there was any emphasis on that.

I'm sorry I was a bit too eager to reply and neglected to change what I 
had pasted in.


I meant to say could you try this


bin/mailwatcher > /dev/null 2>&1 &


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: My script almost works but spams the terminal its launched from if useing dash.

2016-04-16 Thread Aero Maxx

On 16/04/2016 16:23, Gene Heskett wrote:

But when I run it with dash, it doesn't seem to work right, and spams the
terminal with its error messages.  One that appears to kill its function
is the bashism of using [[ ]] to surround string variables, reported
like this:
bin/mailwatcher: 64: bin/mailwatcher: [[: not found
bin/mailwatcher: 70: bin/mailwatcher: [[: not found
bin/mailwatcher: 77: bin/mailwatcher: [[: not found


dash isn't the same as bash, as it has a limited set of instructions or 
commands it can do.


But I too would be interested to know if it is possible to get it to 
work in dash, I don't believe it is, but I am happy to be corrected

or proved wrong.


And finally, once its working with either shell, how do I shut it up
totally?  Even the above command line launch fails as it outputs to that
shell, a newline for every incoming mail which gradually scrolls any
output that was on-screen, offscreen without leaving a prompt until I
tap the return key to restore it.


Also isn't the command you are running supposed to be as follows ?


bin/mailwatcher 2>&1 > /dev/null &



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Script doesn't work when it is run using '#!/bin/sh'

2016-04-16 Thread Aero Maxx

On 16/04/2016 14:08, to...@tuxteam.de wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, Apr 16, 2016 at 01:22:09PM +0100, Aero Maxx wrote:

I have a number of bash scripts that work perfectly fine on fedora
23, but do not work on debian 8.  I've tried to sort it out myself,
but am a little stuck now hopefully someone is able to give me a
nudge in the right direction.
The output I get from the above script is

wordpress_beta.sh: 8: bashtest.sh: [[: not found
wordpress_beta.sh: 8: bashtest.sh: web: not found
wordpress_beta.sh: 8: bashtest.sh: web: not found

Setting current directory to 'web' web public folder.

The [[ is correct bash syntax. To try to pinpoint the problem, try
running the script with "bash 

Script doesn't work when it is run using '#!/bin/sh'

2016-04-16 Thread Aero Maxx
I have a number of bash scripts that work perfectly fine on fedora 23, 
but do not work on debian 8.  I've tried to sort it out myself, but am a 
little stuck now hopefully someone is able to give me a nudge in the 
right direction.


Ideally I would like them to work on both.

On Fedora 23

$ ls -l /bin/sh
lrwxrwxrwx. 1 root root 4 Jan 11 11:02 /bin/sh -> bash
$ echo ${BASH_VERSION%%[^0-9.]*}
4.3.42


On Debian 8

$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Nov  8  2014 /bin/sh -> dash
$ echo ${BASH_VERSION%%[^0-9.]*}
4.3.30


As I discovered they weren't using the same bash, so I changed over my 
scripts to use #!/bin/bash and thought my problem would be solved, this 
doesn't seem to be the case, some errors have gone but some still remain.


I have shortened the script and pasted it below, its the IF part which 
is failing on debian 8.



#!/bin/bash

clear;
devSite="/home/admin/web/";

for domainDir in $(find ${devSite} -maxdepth 1 -type d); do

if [[ $domainDir == $devSite || $(basename ${domainDir}) == 
'site1' || $(basename ${domainDir}) == 'site2' ]]; then continue; fi;


echo "";
echo "Setting current directory to '$(basename ${domainDir})' web 
public folder.";

cd ${domainDir}/web/public;

done;


The output I get from the above script is

wordpress_beta.sh: 8: bashtest.sh: [[: not found
wordpress_beta.sh: 8: bashtest.sh: web: not found
wordpress_beta.sh: 8: bashtest.sh: web: not found

Setting current directory to 'web' web public folder.



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Changing Window Title in Putty

2016-04-10 Thread Aero Maxx

I believe I have the command prompt set correctly as to how I want it.

For this I want it to show at all times, regardless of if I am in a 
screen or not.

"[root@localhost ~]# "

For the window title in whatever ssh client I happen to be using I would 
like it to be as follows when not in a screen session

"root@localhost:~"

When I am in a screen I want the windows title to show
"[screen 0: root@localhost ~]# "

At present I have managed to get the window title to be correct when not 
in a screen, but when I am in a screen it shows as follows

"[screen 0: bash] root@localhost ~ "


In Fedora $PROMPT_COMMAND is set with
xterm*|vte*)
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" 
"${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'

;;
screen*)
PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" 
"${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'

;;

In Debian $PROMPT_COMMAND isn't set with anything.


I'm a little more confused now as I thought $PS1 was for the command 
prompt as this has a setting for it to be coloured in the .bashrc file, 
and obviously the window title bar wouldn't pay any attention to the 
colours.


So what is $PROMPT_COMMAND actually for ? is this the command prompt or 
the windows title.



On 10/04/2016 15:21, John L. Ries wrote:
You definitely confused me, and I'm still not entirely sure what you 
want. But you can set the window title for a PuTTY session and keep it 
from changing in the manner I described in my initial response. I 
assume you have a different PuTTY profile for each server to which you 
connect, so there should be no difficulty in customizing each to get 
the desired behavior.


Regardless, your settings on each server are only relevant to window 
titles if you want the server to control them instead of your terminal 
emulator; and in that case, it would be helpful to know such gory 
details as what shell you're running on the server, and what you 
actually want displayed locally.


I assume you're discussing windows on your local desktop, in which 
case, .screenrc is irrelevant (that only governs screen sessions).


On April 10, 2016 7:25:06 AM MDT, Aero Maxx <aero.max...@gmail.com> 
wrote:



On 10/04/2016 14:13, Andrew McGlashan wrote:

You see I had to change the /etc/screenrc file and turn
the hardstatus line to show that I was in a screen. 


Well, you did ask specifically about putty and the solution
would do what is needed for putty. In which case, it wouldn't
matter what the /etc/screen settings are. 



Ok well perhaps that was some confusion there as I merely meant that I
was using putty, but the window title would appear in other programs
also, not just putty.

I think your getting confused as what I want to do has
nothing to do with putty. 


"Changing Window Title in Putty" -- subject line?

As I can also use terminal on my Apple Mac and it also
shows the window title different on the two servers which
I am comparing, so if one shows it how I want and the
other one does not, and the putty client or whatever
client has the configurations identically for each server,
then the only thing that must be different is the server
itself surely, as they have both been configured the same
do you follow me ? 


Yes, I follow. The other thing you can do is adjust the PS1 /
PS2 lines on the terminal. That won't involve putty or screen
settings A.


I've played about with the PS1 line, I wasn't aware of a PS2 line,

I've done as much as I am able to on my own through trial and error.

This is what appear on fedora
  [screen 0: user@localhost:~]

This is what appears on debian 8
  [screen 0: bash] user@localhost:~

See the difference? i'd like the debian 8 one to be the same as the
fedora one if at all possible.
I guess this is merely a file change somewhere but I am unable to find
what I need to change to get it to be the same.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
Sent from my Android device with K-9 Mail. Please excuse my brevity. 




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: Changing Window Title in Putty

2016-04-10 Thread Aero Maxx



On 10/04/2016 14:13, Andrew McGlashan wrote:

You see I had to change the /etc/screenrc file and turn the hardstatus
line to show that I was in a screen.

Well, you did ask specifically about putty and the solution would do
what is needed for putty.  In which case, it wouldn't matter what the
/etc/screen settings are.


Ok well perhaps that was some confusion there as I merely meant that I 
was using putty, but the window title would appear in other programs 
also, not just putty.





I think your getting confused as what I want to do has nothing to do
with putty.

"Changing Window Title in Putty" -- subject line?


As I can also use terminal on my Apple Mac and it also shows the window
title different on the two servers which I am comparing, so if one shows
it how I want and the other one does not, and the putty client or
whatever client has the configurations identically for each server, then
the only thing that must be different is the server itself surely, as
they have both been configured the same do you follow me ?

Yes, I follow.

The other thing you can do is adjust the PS1 / PS2 lines on the
terminal.  That won't involve putty or screen settings

A.


I've played about with the PS1 line, I wasn't aware of a PS2 line,

I've done as much as I am able to on my own through trial and error.

This is what appear on fedora
[screen 0: user@localhost:~]

This is what appears on debian 8
[screen 0: bash] user@localhost:~

See the difference? i'd like the debian 8 one to be the same as the 
fedora one if at all possible.
I guess this is merely a file change somewhere but I am unable to find 
what I need to change to get it to be the same.



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Changing Window Title in Putty

2016-04-10 Thread Aero Maxx



On 10/04/2016 09:14, Andrew McGlashan wrote:

The first thing I do with Putty is adjust the "default settings" to my
liking, save it and then use that as a base for new entries for each
server that I need to connect to; I save each server's settings.

That lends itself well to giving each saved session it's own window
title in the manner that you've been given.  It's the perfect answer for
you.

Cheers
A.


Actually it's not.

You see I had to change the /etc/screenrc file and turn the hardstatus 
line to show that I was in a screen.


I think your getting confused as what I want to do has nothing to do 
with putty.


As I can also use terminal on my Apple Mac and it also shows the window 
title different on the two servers which I am comparing, so if one shows 
it how I want and the other one does not, and the putty client or 
whatever client has the configurations identically for each server, then 
the only thing that must be different is the server itself surely, as 
they have both been configured the same do you follow me ?



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Changing Window Title in Putty

2016-04-10 Thread Aero Maxx

On 10/04/2016 04:24, Andrew McGlashan wrote:


On 10/04/2016 6:12 AM, Aero Maxx wrote:

I only have ssh access to the server, no gui.

Umm, the instruction looks very good for putty as you asked for.

Which version of putty are you using and what type of machine are you
running it from?

A.

That maybe the case but it's nothing something in putty that I need to 
change.


When I use the same putty client to log into both a debian 8 server and 
a fedora server, the fedora one has the window title how I want it, the 
debian server has the window title different.


So I must need to change a file on debian surely else why would they be 
different when using the same putty client and having it configured the 
same for both servers.


Thanks,
Daniel.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Changing Window Title in Putty

2016-04-09 Thread Aero Maxx

I only have ssh access to the server, no gui.

On 09/04/2016 19:05, John L. Ries wrote:

I may be misunderstanding you but:

1.  Load the session configuration.
2.  Select Terminal/Features.  Check "Disable remote-controlled window 
title changing".
3.  Select Window/Behavior.  Fill in the Window title as seems good to 
you.

4.  Go back to Session.  Click on the Save button.

--|
John L. Ries  |
Salford Systems   |
Phone: (619)543-8880 x107 |
or (435)867-8885  |
--|


On Saturday 2016-04-09 07:29, Aero Maxx wrote:


Date: Sat, 9 Apr 2016 07:29:17
From: Aero Maxx <aero.max...@gmail.com>
To: "debian-user@lists.debian.org" <debian-user@lists.debian.org>
Subject: Changing Window Title in Putty
Resent-Date: Sat, 9 Apr 2016 13:29:38 +
Resent-From: <debian-user@lists.debian.org>

Hi Everyone,

I am currently running 2 servers on my home network the main one 
being a fedora server, and the other being a debian server.


I'm wanting to change the fedora server to run debian instead, but 
using the other server to try it out and have it set up the same.


I think I am almost there, but I am finding it difficult to work out 
how to change the window tile.


I've editted the /etc/screenrc file, and turned on the hardstatus. 
I've also changed the hardstatus string to "[screen %n%?: %t%?] %h".


That has sort of done half of what I was wanting in that is now shows 
[screen 0: bash] in the title bar so I am able to see that I am in a 
screen, as sometimes I forget.


When I am not in a screen the window title shows user@localhost:~ I'd 
like this to be able to replace bash with this as this is how it 
appears on fedora.


I have played around with the .bashrc file in /home/user/.bashrc and 
have managed to get the window title to now be "[screen 0: bash] 
user@localhost:~" in the window title.


I guess this is ok, but I would be interested to know how to replace 
bash in the title bar still as am unsure where this is coming from.


Thanks,
Daniel


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Changing Window Title in Putty

2016-04-09 Thread Aero Maxx

Hi Everyone,

I am currently running 2 servers on my home network the main one being a 
fedora server, and the other being a debian server.


I'm wanting to change the fedora server to run debian instead, but using 
the other server to try it out and have it set up the same.


I think I am almost there, but I am finding it difficult to work out how 
to change the window tile.


I've editted the /etc/screenrc file, and turned on the hardstatus. I've 
also changed the hardstatus string to "[screen %n%?: %t%?] %h".


That has sort of done half of what I was wanting in that is now shows 
[screen 0: bash] in the title bar so I am able to see that I am in a 
screen, as sometimes I forget.


When I am not in a screen the window title shows user@localhost:~ I'd 
like this to be able to replace bash with this as this is how it appears 
on fedora.


I have played around with the .bashrc file in /home/user/.bashrc and 
have managed to get the window title to now be "[screen 0: bash] 
user@localhost:~" in the window title.


I guess this is ok, but I would be interested to know how to replace 
bash in the title bar still as am unsure where this is coming from.


Thanks,
Daniel


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



screen 0: in putty title bar

2014-09-18 Thread Aero Maxx

Hi Everyone,

I'm in the process of moving from fedora to debian.

But I have one question about the use of screen when I use it, the title 
bar in putty doesn't change like it does in fedora to show/remind me 
that I am in a screen, I was wondering how do I change this in debian ?


Thanks
Daniel.


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/541af81f.1010...@gmail.com



Re: screen 0: in putty title bar

2014-09-18 Thread Aero Maxx

On 18/09/2014 16:30, Reco wrote:

  Hi.

On Thu, 18 Sep 2014 16:19:59 +0100
Aero Maxx aero.max...@gmail.com wrote:


Hi Everyone,

I'm in the process of moving from fedora to debian.

But I have one question about the use of screen when I use it, the title
bar in putty doesn't change like it does in fedora to show/remind me
that I am in a screen, I was wondering how do I change this in debian ?

Try adding this to your /etc/screenrc:

hardstatus on
hardstatus string [screen %n%?: %t%?] %h

Reco

Thats amazing thank you ever so much! It works a treat.

Daniel.


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/541afb6f.1060...@gmail.com



Re: screen 0: in putty title bar

2014-09-18 Thread Aero Maxx


On 18/09/2014 16:30, Reco wrote:

  Hi.

On Thu, 18 Sep 2014 16:19:59 +0100
Aero Maxx aero.max...@gmail.com wrote:


Hi Everyone,

I'm in the process of moving from fedora to debian.

But I have one question about the use of screen when I use it, the title
bar in putty doesn't change like it does in fedora to show/remind me
that I am in a screen, I was wondering how do I change this in debian ?

Try adding this to your /etc/screenrc:

hardstatus on
hardstatus string [screen %n%?: %t%?] %h

Reco

Hi Everyone,

This works great, and was a good starting point in the right direction, 
I've done a bit of playing around and checking what the difference is on 
fedora and debian, and can see lots but what I think I need to do now is 
something to do with this from fedora.


PROMPT_COMMAND='printf \033k%s@%s:%s\033\\ ${USER} ${HOSTNAME%%.*} 
${PWD/#$HOME/~}'


Id like it to show [screen 0: daniel@hostname:/home/daniel] in the putty 
title bar.


Also would like for it so show [daniel@hostname daniel]# at the command 
prompt part.


Thanks
Daniel


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/541b094e.8060...@gmail.com



Re: screen 0: in putty title bar

2014-09-18 Thread Aero Maxx


On 18/09/2014 17:38, B wrote:

On Thu, 18 Sep 2014 17:33:18 +0100
Apero Maxx aero.max...@gmail.com wrote:


PROMPT_COMMAND='printf \033k%s@%s:%s\033\\ ${USER}
${HOSTNAME%%.*} ${PWD/#$HOME/~}'

Check ~/.bashrc for the right string.

I've cracked it thank you! Working just how I like it now.

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/541b438c.9010...@gmail.com