Category Archives: Linux Ubuntu

Linux Ubuntu

config syslog-ng source all ipaddress

edit syslog-ng.config

nano /etc/syslog-ng/syslog-ng.conf

add end file

source s_fortigate {
udp(ip(0.0.0.0) port(514));
tcp(ip(0.0.0.0) port(514));
};
destination d_fortigate {
file(
“/var/log/fortigate/$HOST-$YEAR$MONTH$DAY.log”
perm(644)
create_dirs(yes)
);
};
log { source(s_fortigate); destination(d_fortigate); };

# or —————————————
source s_net { udp(ip(0.0.0.0) port(514)); };
#destination d_router { file(“/var/log/syslog”); };
destination d_router { file(“/var/log/router/$HOST-$YEAR$MONTH$DAY.log”); };

log { source(s_net); destination(d_router); };

New chmod 644
chmod 644 /var/log/syslog

sudo /etc/init.d/apache2 start

* Starting web server apache2

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8080 no listening sockets available, shutting down Unable to open logs …fail!

#sudo netstat -tulpn| grep :80

#killall -9 apache2

#sudo /etc/init.d/apache2 start

* Starting web server apache2 …done.  ok wokr

 

 

 

New SSL Ubuntu Server

What the Red Means

The lines that the user needs to enter or customize will be in red in this tutorial! The rest should mostly be copy-and-pastable.

About SSL Certificates

A SSL certificate is a way to encrypt a site’s information and create a more secure connection. Additionally, the certificate can show the virtual private server’s identification information to site visitors. Certificate Authorities can issue SSL certificates that verify the server’s details while a self-signed certificate has no 3rd party corroboration.

Set Up

The steps in this tutorial require the user to have root privileges on the VPS. You can see how to set that up here in steps 3 and 4.

Additionally, you need to have apache already installed and running on your virtual server. If this is not the case, you can download it with this command:

sudo apt-get install apache2

Step One—Activate the SSL Module

The next step is to enable SSL on the droplet.

sudo a2enmod ssl
 Continue reading 

Turn the firewall on or off

Allow or block specific network activity

# sudo ufw enable

# sudo ufw disable

allow SSH connections

# sudo ufw allow ssh

#sudo ufw block ssh

allow connections on port 53

#sudo ufw allow 53

#sudo ufw block 53

List current firewall rules and stop firewall (old method)

# sudo iptables -L -n

and

#sudo ufw status verbose