restart plesks (v 10.3.1) iptables rules from console [closed] - firewall

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm using Plesk 10.3.1.
I have some settings made in the Plesk Firewall Tool:
The Plesk Panel (port 8443) is only accessable from defined IPs.
SSH is open for all (not for root and on an ohter port)
Now, when I have an IP which is not allow for plesk panel I cant login.
So I connect to SSH and want add my current IP to the iptables rules, how to do that
or where is the needed file?
how can I edit (where is the file?) and restart the current iptables rules generated with the plesk firewall script/tool in the console?
plesk 10.3 dont use /etc/sysconfig/iptables file, this is empty or only has standard config ...
best,

From what little I know, Plesk stores the firewall configuration in /sbin/iptables for Ubuntu.
I followed this Firewall logging tutorial which explains how to add a new iptables set of rules.
I'm wary to give you specific advice as you can knacker yourself very quickly with iptables.
However running $ /sbin/iptables --line-numbers -nL is a good place to start which will show you the existing iptables rules that you have.

Related

How to change VestaCP admin default port [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to change VestaCP admin default port 8083 to 8342
I was edit editor
/usr/local/vesta/nginx/conf/nginx.conf
and change to
# Vhost
server {
listen 8083;
to
# Vhost
server {
listen 8342;
and run command
> service vesta restart
but its not working.
Log into your Vesta Control Panel
Go to Firewall, add new port (for example 1234) to "Vesta" Rule (default 8083), like so:
3. Log into the server via ssh
4. sudo nano /usr/local/vesta/nginx/conf/nginx.conf
locate listen 8083; and replace it with listen 1234;
5. Go back to vesta firewall rule, remove the old port and leave only the new.
6. sudo service vesta restart
That's it
First step:
v-update-sys-vesta-all
Second step:
sed -i 's/8083;/1111;/' /usr/local/vesta/nginx/conf/nginx.conf && v-add-firewall-rule ACCEPT 0.0.0.0/0 1111 TCP && service vesta restart
I am using HestiaCP, a fork of VestaCP. This fork has a new CLI command
v-change-sys-port
that you can use to change the port in a split second. Check this link https://angelright.com/184/how-to-customize-hestia-fork-of-vesta-debian-9 to see how it works.

Accessing a virtual linux machine using another linux virtual machine [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I need to test and practice ssh(secure shell deamon) in linux,to do that I have configured a centOS 7.0 virtual machine and a ubuntu 12.10 virtual machine in VMware 12.0 workstation.(My host machine is running windows 8)
I powered up both virtual machines and try to connect ubuntu machine from centos machine using ssh root#IPaddress .but I continue to get the error
ssh: connect to host 92.222.136.30 port 22: Connection refused
I don't know it is possible to ssh connect in that manner.But I don't no any other way to test and practice this stuff.What is the wrong I have done here?or is there any easy method to do this?
what is the network configuration.
I would suggest using Bridge adapters on both machines.
If you are trying for a static IP on both then I would suggest try the following configuration
VM-1: two NIC cards. NIC-1 on NAT and NIC-2 on bridge (static IP)
VM-2: two NIC cards. NIC-1 on NAT and NIC-2 on bridge (static IP)
I would also suggest trying to allow port 22 on firewalld or Iptables or you can completely disable firewalls by using the following commands since you are testing
systemctl stop firewalld
systemctl disable firewalld
also check if the port 22 is open, check with
netstat -tulnp | grep -i 22
and see I presume you are running centos as a server [infrastructure server/ or a full installation]. If on minimal install of centos you would have to install the openssh server using yum -y install openssh-server
I hope this helps, Thanks
telnet IPaddress 22 ( check if ssh port is open )
check your ssh port using command netstat -plantu
turn off the firewall or flush IP tables
use command ssh root#IPaddress -p 22 (if you use custom port then change value 22 to your port number)

Need to enable http in OpenSUSE Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have newly installed in my machine Linux OpenSUSE. Also i have installed Xampp in that service. After staring the apache i am able to see the PHP apache using localhost url. But when i trying using IP address. Nothing is showing in the page.
That is localhost/xampp.php is working.
But http://10.21.30.220/xampp.php is not working.
I have checked both http port and apache and both ar running.
linux-pott:~ # /opt/lampp/lampp status
Version: XAMPP for Linux 5.5.19-0
Apache is running.
MySQL is running.
ProFTPD is running.
linux-pott:~ # netstat -tulppn | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 24782/httpd
How can i fix my problem. Again i am telling my OS is Linux OpenSUSE.
In your xampppath\apache\conf\extra open file httpd-xampp.conf and find the below tag:
# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
and add
"Allow from all"
after Allow from ::1 127.0.0.0/8 {line}
Restart xampp, and you are done.
Try to disable firewall using following command
/sbin/SuSEfirewall2 off

Yum install through other server [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have two servers (CentOS 6.2) on the same network. One of them (server1) has access to internet and the other one (server2) doesn't.
I need to configure my servers so that server2 could install packages!
Please help !
You could configure NAT on the server with internet access.
Or you can setup a squid proxy on your internet capable server.
This basically means giving internet access to the machine that doesn't have it now.
On the machine with internet access:
yum install squid
Now edit /etc/squid/squid.conf.
add a line like this:
acl internal_server src XXX.XXX.XXX.XXX/32
where XXX.XXX.XXX.XXX is inside server ip
next add:
http_access allow internal_server
and finally restart the squid server:
/etc/init.d/squid restart
Now, on the internal server:
edit /etc/yum.conf and add:
proxy=http://YYY.YYY.YYY.YYY:3128
Thats it!
Try to configure NAT on your server connected to the internet. Make that server default gateway to one that hasn't got an internet.

iptables port forwarding doesn't persist after restart [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have server instance running on amazon ec2. I want to forward from port 80 to 8080 using iptables. Which works fine until restart when it stops forwarding. I have used
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 8080
to set up fowarding. What do I need to do to make it persistant?
Thanks
I found a good blog post explaining how to do it
https://help.ubuntu.com/community/IptablesHowTo
You have to run your firewall rules at boot time.

Resources