Ubuntu Servers :: Redirecting Ports For Running Two Web Servers
Sep 5, 2010
I am running apache2 and tornado web servers on the same server with one ip address.
The apache2 listens on port 80. Tornado listens on port 8888. I want to redirect requests from a specific ip port 80 to port 8888. I don't have the ability to change the port request on the device. It wants is looking for a web server on port 80.
Any other web server request should go to the apache.
I tried adding the following to /etc/ufw/before.rules
When I run iptables -L it doesn't appear. I have disabled and enabled ufw with no help.
View 3 Replies
ADVERTISEMENT
Jun 7, 2010
I have a command line server that logs to stdout, which I start along the lines of ./server > log.txt
What I want to do is limit the size of log.txt, without modifying the server.
I am assuming there must be some kind of tool already that lets me do this, something like where I can pass in my server, the output file and a size limit? If so, can anyone enlighten me?
View 3 Replies
View Related
May 26, 2010
I am having a few websites running in a Reverse Proxy scenario on Ubuntu Server 10.04. The configuration is like this:
Code:
|--------------192.168.1.1
| (site1.abc.com)
|
|--------------192.168.1.2
| (site2.abc.com)
|
|
|
|
|--------------192.168.1.3
| (site3.abc.com)
|
|
|
|
|--------------192.168.1.4
| (site4.abc.com)
(Public IP ) |
A-------------------|
(reverse proxy server) |
(192.168.1.25) |
|--------------192.168.1.5
| (site5.abc.com)
|
Except one all websites are running properly and being redirected to their respective domains.
Following is the configuration which I used for each site define on server A a vhost file which contains following
Code:
# ProxyPass / http://<Ip of Server>
# ProxyPassReverse / http://<Ip of Server>
So if I have 5 websites then I have 5 vhost file on the gateway in above diagram A and in each of those file as above root of site is redirected to internal IP. 4 of them are running properly. The fifth website is running on port 8080:/keyword. So in its vhost file on gateway I defined
Code:
# ProxyPass / http://<Ip of Server>:8080/keyword
# ProxyPassReverse / http://<Ip of Server>:8080/keyword
I can see on Lan http://<Ip of Server>:8080/keyword but when from internet I try to see:
http://site5.abc.com
I get redirected to a page is https://site5.abc.com:8443/ and it says
Code:
The webpage at https://site5.abc.com:8443/ might be temporarily down or it may have moved permanently to a new web address. The site5.abc.com has a requirement to be run at port 8080 internally and it is not a Ubuntu server.(Red Hat based server). While rest all are Ubuntu servers including gateway A.
View 1 Replies
View Related
Jul 22, 2010
I'm trying to run a web server on ubuntu lucid, and I have a problem what is not directly linux related, but a problem with opening ports. I hope this question is welcome here as well. When I open port 80 everything works well. My server is accessible from outside. But strangely the day after the port is closed again. Right now I have do reset my router every day to keep that port open and well, that's not much of a solution. I wonder how it is possible. I configure everything on my router, I save the settings and it works. How come it automatically resets my configurations over time?
View 9 Replies
View Related
Dec 15, 2010
"Ubuntu Server has no open ports by default" - [URL]. Does this mean right after a 10.04 Server Edition installation, if a user wants to start a web service e.g. a Java process to listen on say port 8080, he would have to configure the firewall first?
View 1 Replies
View Related
May 1, 2011
I just finished setting up a Natty box to act as my home router / home web server. I installed beta2 a few days before the final was out and updated all of the packages (also tried a dist-upgrade just in case ).
I performed the following setup:
- set up the webserver and sshd
- set up dhcp server and adressing
- set up rc.local to run rc.firewall with my filtering rules
- set the router live (rebooting it)
And that was basically it. Everything worked fine, except when I tried to open any of the sites that are hosted on the webserver from the outside world. It turned out that all of the ports on the external interface were blocked.
I decided to stop my firewall rules (flushing all rules) and then scan my box from the outside - still, all ports seemed to be filtered. I then decided to reboot the machine, disabling all mention of the rc.firewall script, but the ports were still filtered!
I then disabled apparmor and made sure ufw is disabled, but the ports are still filtered for the outside world. For the internal network they are not filtered.
Is there some other mechanism besides iptables rules that filteres packets?
View 2 Replies
View Related
Feb 22, 2010
I am unable to find the syslogd files. Ubuntu 9.1 installed. Logging is taking place. I want to redirect logging to central location. Do I need to install syslogd in order to control this service or is it controled via a different name/service?
View 1 Replies
View Related
Mar 28, 2010
I've been struggling for days trying to open port 53 and 25 but can't get it to work. My iptables at /etc/sysconfig contains the following:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0] .....
On the server machine when I do port scan with nmap I see the following result:
Starting Nmap 4.76 [URL] at 2010-03-28 01:03 CET
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Interesting ports on localhost (127.0.0.1):
Not shown: 986 closed ports .....
But when I try to do telnet from an external machine, e.g:
telnet <IP of host> 53
I get:
Connection refused
telnet: Unable to connect to remote host
I also did a port scan with a tool on an external machine but port 53 and 25 weren't listed as opened ports. Also CheckDNS.net on the server returns "Connection reset. Probably DNS server is offline". I am 100% sure that named and sendmail are running. When I do a ps -aux I see:
named 9261 0.0 0.3 85528 14784 ? Ssl 00:46 0:00 /usr/sbin/named -u named
root 2550 0.0 0.0 9536 1960 ? Ss Mar23 0:02 sendmail: accepting connections
View 14 Replies
View Related
Mar 28, 2010
I have several sites running on a local server. Currently, they're all running on port 80. I need one particular site (and ONLY that site) to also accept connections on port 81.
If I browse to the server IP x.x.x.x:80 directly, Apache's behaviour of showing the default site should work as usual. But, if I browse to IP x.x.x.x:81, it should show a different site (the one that should be accepting both :80 and :81). This part is very important.
I was hoping something like the following would work, but it didn't Currently x.x.x.x:81 still shows what I've called myport80defaultsite.com below.
Code:
Listen 80
Listen 81
<VirtualHost *:80>
ServerName myport80defaultsite.com
[Code].....
View 1 Replies
View Related
Jul 23, 2010
How to configure iptables to allow only 22,80,3306 ports for only a dynamic public ip/dyn dns domain name on a ubuntu server?
View 9 Replies
View Related
Jul 26, 2010
I am having trouble getting ports to open, on the router that the server is connected to it is set to DMZ, so everything passing through the router should go to the server right? but when I use a port checker none of the ports that I need to be open are. so my question is does ubuntu have a built in firewall that no one told me about? or something that would block me from having the ports open?
View 3 Replies
View Related
Aug 4, 2010
I've installed Sun Java, tomcat6 and tomcat6-admin on 10.04 server 64-bit. By default, tomcat is configured to run as the tomcat6 user. Everything runs just fine on tcp/8080 as initially configured. Modifying the connector port in /etc/tomcat6/server.xml to anything below 1024 (e.g. port 80) results in:
SEVERE: Error starting endpoint
java.net.BindException: Permission denied <null>:80
This all begs the question... do you *really* have to run tomcat as root to bind to a well-known port? I.e. is there really no way for tomcat to start as root, bind to a privileged port and then drop privs?
View 6 Replies
View Related
Sep 8, 2010
I have linux server setup on a network with 2 interfaces. One (eth0) is connected to the regular network and the other (eth1) has a DHCP server and transparent web cache listening on it. The machines connected on the eth1 side are on a different subnet and the linux server is there gateway. Untrusted machines are introduced to this network to keep them isolated.
This isolation works well, too well. There are a small set of resources on the regular network I would like to make available to machines on untrustworthy network. I think I need to use iptables but alas I've had no luck in piecing together the command I need (in one case looking myself out and having to physically reset the machine).
View 3 Replies
View Related
Dec 15, 2010
I've tried to set up a Hadoop cluster on a few freshly-installed 10.04 Server Edition machines and hit a problem. (I was able to set up the cluster using Desktop edition previously). The issue is that I can't connect to the service even though the Java process is running and listening on the port and there is no error in the logs. Anyway, I started to wonder if it was firewall issue so I googled it and found conflicting information.
1. "Ubuntu Server has no open ports by default" - [URL]
2. iptables shows different info. ufw is also disabled.
hadoopadmin@machine-1:~$ sudo iptables -L
[sudo] password for hadoopadmin:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
hadoopadmin@machine-1:~$ sudo ufw status verbose
Status: inactive
I even tried to enable ufw and did "sudo ufw default allow incoming" but still no help. The only package I manually selected during installation is OpenSSH server.
View 1 Replies
View Related
Jul 8, 2011
I want to edit the file ports.conf to make Apache to listen only to loopback interface as described [URL]... here ,The text extract follows
Quote:
The Listen directive specifies the port, and optionally the IP address, Apache2 should listen on. If the IP address is not specified,Apache2 will listen on all IP addresses assigned to the machine it runs on. The default value for the Listen directive is 80. Change this to 127.0.0.1:80 to cause Apache2 to listen only on your loopback interface so that it will not be available to the Internet, to (for example) 81 to change the port that it listens on, or leave it as is for normal operation. This directive can be found and changed in its own file, /etc/apache2/ports.conf
But by typing [CODE]sudo vi /etc/apache2/ports.conf [/CODE} and opening the file I am not able to edit the file After going to the Listen Directive I am not able to type 127.0..0.1, Since what I type does not appear on the screen, the Keyboard is not working. How will I be able to edit the ports.conf and other configuration files
View 3 Replies
View Related
Nov 19, 2010
I have a JavaCL program trying to open a port on 41xxx and it is getting permission denied unless I run it as root. I would like to grant a single user this permission for opening this port. This program runs fine on a vanilla ubuntu install but not on server. Where does Ubuntu handle user permissions for opening ports?I understand this is typically a no-no on a server but this is an unusual circumstance.
View 1 Replies
View Related
Nov 26, 2010
I can't browse my SAMBA shares because ports between 137 to 139 and 445 are closed, but I don't know why.
I even turn off iptables
Code:
But...
Code:
View 9 Replies
View Related
Dec 12, 2010
I have recently installed an ltsp system, client and server. Everything works except i cannot get my client side serial ports to work or register for that matter. Can anyone point me to the steps i should take to get these working.
View 1 Replies
View Related
Jul 7, 2011
I have ordered a server with OS:
Ubuntu Server 11.04
After a quick nmap scan I found out a few open ports. What is using these ports?
1102/tcp filtered adobeserver-1
1201/tcp open nucleus-sand
View 4 Replies
View Related
Apr 12, 2010
I am trying to setup a VPN on my FC 12 box. Looks like getting openvpn to work behind NAT is as easy as just forwarding the ports. Do I need to forward any specific protocols (GRE, etc)? Also, can I do this with one Ethernet port (IE: RJ-45 jack), or do you recommend a second ethernet port? I could add in another PCI ethernet card if it makes it easier. Anyone know if a single ethernet jack will work or do I need two?
View 2 Replies
View Related
Jan 17, 2011
Looking for a test tool where I can fire up any number of ports (TCP and / or UDP) to listen on.
I am currently getting my using nc but its only 1 port at a time (i know I can open up multiple sessions but thats cumbersome), it can't do UDP, and it closes at the end of the session.
A friend has suggested socat but it looks pretty much the same except it can do UDP, but also cumbersome, I have to manually output to a different file per port, etc.
Basically its so I can quickly test firewall and NAT rules.
View 7 Replies
View Related
Mar 19, 2010
We are running IPmonitor to monitor the disk usage on our Linux servers. It does not seem to coincide with what is reported when running df -h. For example on a Red Hat 5.3 server - our IPmonitor shows that 85% is used on the /usr partition, however when I do a df -h on the server it shows that 91% is used. Why there would be a discrepancy? IPmonitor uses SNMP.
View 5 Replies
View Related
May 26, 2011
I'd like to set up a fileserver for myself and a few trusted individuals. I'm computer savvy and I use various linux servers frequently for work, but this is my first time trying to setup my own. Is it possible to have a Samba server setup so it is both secure and facing the Internet? Two questions:
Will opening Samba ports make my default Ubuntu server particularly vulnerable to penetration? More than having an SSH server running? Does Samba/ can Samba be configured to encrypt traffic or is it sent plainly? If so, does Windows and Mac support this secure communication?
If not, what would you suggest? I'd like to achieve something like a network drive and at a difficulty level that my parents could use this if they really wanted to. I will be storing things like financial information and tax returns, but no weapons-grade secrets.
View 9 Replies
View Related
Feb 11, 2010
I'm running my own webserver at home. I've also bought a domain (it's .nl because I'm Dutch). But now I need to change the nameservers from my domain.
I've read a lot of things about running your own authoritative nameserver and things like that. I also experimented with bind9 but I can't get it.
So, I've got a Webserver running Ubuntu Server. I've bought a domain. Nothing more and nothing less. So is it possible to run a nameserver or something else to get it work in this situation?
View 9 Replies
View Related
May 8, 2010
when i go to my server's IP address, the index.php files is downloaded, not run, how can I fix this? I have php5 installed and enabled.
Quote:
root@ubuntu:~$ ls /etc/apache2/mods-enabled/
alias.conf authz_user.load dir.load php5.load
alias.load autoindex.conf env.load reqtimeout.conf
auth_basic.load autoindex.load mime.conf reqtimeout.load
[Code]....
View 4 Replies
View Related
Dec 9, 2010
I'm looking to run some R scripts on a mysql database (engine =csv) from the apache webserver.
The goal is to record some statistics/numbers while someone is logged in, pass those numbers to r, run some statistics algorithms on the passed set of data and output an image file back to the logged-in user's html web page.
Doing this along with knowledge on how to call general r functions from within a php framework would be great.
View 1 Replies
View Related
Feb 16, 2011
My application environment which is made of jdk1.6,Tomcat 6, my sql 5.0. When i deployed my project in ubuntu 8.4, it was running fine.
But when i added
richfaces-api-3.3.3.Final.jar
richfaces-impl-3.3.3.Final.jar
richfaces-impl-jsf2-3.3.3.Final.jar
richfaces-ui-3.3.3.Final.jar
jar file in my application and deployed it in ubuntu10.4 then also it run smoothly.
But when i m trying to deploy it in ubuntu8.4 it shows an error
"resource not found"
View 1 Replies
View Related
Apr 20, 2011
I recently got a second-hand ProLiant DL380 G3. Currently it has no storage on it. So I was wondering, if and how I could run Ubuntu Server 10.10 (or any free server distro really) from PXE boot until I can get a hard drive. After I get the drive I will also need to install it using PXE as well.
View 1 Replies
View Related
Mar 8, 2010
I currently have an Ubuntu Server setup with a CF card that has / and /boot on their own partitions. I also have a single 1TB drive that is dedicated to the /home partition, however it's a drive that I have run out of space on.
I just purchased a 1.5TB drive to throw in the server, but I am not sure how to set this drive up so that it's seamlessly integrated with the 1TB drive. I would like it setup so that my /home partition is expanded from 1Tb to 2.5TB. I know what I am explaining is similar to raid 0, of which I am not opposed to, except that everything I have searched for online solely explains a raid setup during installation, and I don't have the time (due to school) to reinstall and reconfigure my system.
So in a nutshell, is there a way to setup raid 0 without doing a re-install or is there a way to setup 'fstab' to accomadate my request?
View 5 Replies
View Related
Mar 14, 2010
I have had a LAMP setup on my computer for a while without any trouble but I have suddenly become unable to access it through either localhost or my IP address. I have tried removing and reinstalling the packages but it still doesn't work and the /var/log/apache2/error.log does not give me any errors.
Here is my apache2.conf
[URL]
View 5 Replies
View Related