Ubuntu Servers :: Deny Access To Tomcat Based On Ip?
Feb 11, 2010
We need to only allow access to a web page only to some ips. We want to do this via Apache but it seems like the standard way of denying all and allowing some ips doesn't work because we mount a webapp using tomcat.
Tomcat6 is built in server with it but i dont know how to use it .I am doing a dynamic web project based on servlet and eclipse galileo is being used as IDE for it.
On my Ubuntu 10.04 lucid lynx server edition machine I have an Apache http server listening on port 80 and today I installed the Funambol server which added an Apache Tomcat server listening on port 8080. From within my lan I can reach both servers, but from outside the lan I can only reach the http server on port 80 and not the Funambol server on port 8080. I get a time out message instead.
In my router I have setup port forwarding, such that both ports 80 and 8080 get forwarded to my server machine. Must Tomcat be told to listen to external requests? Is my server listening on port 8080 only for requests inside the lan? Or is there some authorization that fails when I try to visit from outside my lan?
Here is some netstat output, I don't know if the differences between the 80 line and the 8080 line are relevant:
I am up and running. Symptom: webapp/servlet deployed to Tomcat, utilizes JDBC driver for MySQL connectivity. Upon launching application in browser and performing action requiring database interaction, exception thrown, server log:
I am having two domains. for ex: www.example1.com and www.example2.com. These two domains need to be hosted under one ip. Yes by configuring name based virtual host we can do that. But, my question is my first domain(www.example1.com) need to be hosted by Apache web server, and my second domain(www.example2.com) need to be hosted by Tomact. Is it possible to configure name based virtual host for a scenario like this.
I installed eclipse and tomcat with package manager. Eclipse and tomcat are running but i can't see tomcat in the eclipse. I just see 'Basic' folder. That is a screenshot [URL]
I want to deny access to my server by PC's from other sub LAN on my company, so I will add the lines ALL: xxx.xx.xx. to hosts.allow and ALL: ALL to hosts.deny?
VampirD Microsoft Windows is like air conditioning Stops working when you open a window. -----BEGIN PGP SIGNATURE-----
I would like to know if it is possible to deny the access to a file for root? Would ACL's be a possibility? I have "googled" around but haven't found anything interesting (except SELinux). I should secure a password file to an important database.
Here's the issue: from time to time I have to take away my son's access to the internet, so I exclude his laptop from my wireless Linksys router. Works like a charm, or it did until he discovered that my neighbor also has a wireless router, and hasn't secured it.
So my son sits in the corner of the house closest to my neighbor and uses their internet.
Is there any way I can tell his laptop to NOT access a particular router? Or even better, to only access my router?
I made a Desktop User account. When I went on that account, it allowed me to execute sudo as if I was an administrator. I don't know what might be causing this. I do have ufw set up and blocking incoming connections. Do you guys know what might be at the root of this?Also, when I used sudo from the user account (which I shouldn't have been able to do), I provided the password for my admin account.
I'm setting up Ubuntu Karmic on my sister's old computer for my nephew, he's quite young so my sister asked to install some content filtering. I'll first setup an OpenDNS account and I've installed and managed to get dansguardian and squid working on a virtual machine to try it out. so far it's working pretty well, but I need to secure it form the inside out.
I was thinking of blocking specific outbound ports so he could not bypass the proxy. because by default the firefox configuration can be easily changed. so I have a couple of questions.
1. is it possible to block outgoing ports on Ubuntu? 2. is that the best method? 3. is there anything else I should be aware of to prevent subversion?
lastly, this question is probably unrelated to this board but I've set up a cron job to update a dynamic ip with OpenDNS, the problem is that the password is in clear text in the user's crontab, can I play with permissions? is it possible to run the job under a root account and deny read/write access to a normal user?
I've assign to access our tomcat server outside WAN, My problem is I've never used debian or linux distro before sad right? , Here's the situation right now.
1. Tomcat is already running thru local, we can access anytime. 2. Our Dev team is the one who install and configure the Tomcat 3. Tomcat is assigned thru port 8088 4. 8088 is already open (I've tried using this port thru IP camera and we successfully open it) 5. When we switch over to our tomcat we cant open the port 8088
I'm trying to access a .jsp page that is located on my apache/tomcat server from the web. I changed the connection port of tomcat to port 80 and changed my doc root from the default "webapps" to my normal web directory. However, whenever I try to visit the page, I only see the code of the page.
If you would like to see what I am talking about, feel free to see it for yourself: [URL]
So researching how to install Tomcat 6, I ran across a guide that specifically states there are issues with the repository version of Tomcat. Doing some more research it seems like this is reported in multiple places including a disussion on the official mailing list that was inconclusive. So my question is, if this is intended for a production server should I use the repository one or manually install it
I'm trying to get a Tomcat server running using the Java VM -server option on Ubuntu Karmic 9.10 (I'm using the official Karmic AMI on EC2: ami-bb709dd2)
I install Tomcat: Code: sudo apt-get -y install tomcat6
I set up a bit of configuration in /etc/default/tomcat6: Code: JAVA_OPTS="-Djava.awt.headless=true -Xms1024m -Xmx1024m -XX:PermSize=384m -XX:MaxPermSize=384m"
I can start Tomcat with no problems: Code: sudo /etc/init.d/tomcat6 restart
However, if I add the -server option into the JAVA_OPTS variable, like so: Code: JAVA_OPTS="-server -Djava.awt.headless=true -Xms1024m -Xmx1024m -XX:PermSize=384m -XX:MaxPermSize=384m"
I get this: Code: $ sudo /etc/init.d/tomcat6 restart * Stopping Tomcat servlet engine tomcat6 ...done. * Starting Tomcat servlet engine tomcat6 Invalid option -server Cannot parse command line arguments
I have tomcat installed with port forwarding to http port 80. I configure ldap authentication for apache2(/var/www). But I could not configure tomcat for ldap authentication.
I'm really new with Ubuntu and have the following problem:I installed successfully sun-java6-jdk using apt-get install sun-java6-jdk Then set up the JAVA_HOME environment variable to "/usr/lib/jvm/java-6-sun-1.6.0.20"
And then installed successfully tomcat6 using apt-get install tomcat6 apt-get install tomcat6-admin tomcat6-examples tomcat6-docs Everything seem to be right, when I try the browser with http://localhost:8080 return a webpage with "It works !" and other text
But, if I try http://localhost:8080/manager/html then returns 404 error, the error is something like "The required resource (manager/html) is not available" (that is my translation from the spanish text "El recurso requerido (/manager/html) no est disponible")
I'm having some trouble with Tomcat 6 after upgrading to 10.10. During the upgrade process, the installer hung while dealing with Tomcat 6, which required me to kill the upgrade and do some clean up, and then re-run `apt-get upgrade` again to get things going. This left some weirdness (like the MOTD for both 10.10 and 10.04 being shown on login), but otherwise things are OK. The only remaining problem I have is Tomcat; it simply won't start when the server is booted. The information I have:
Tomcat 6 runs normally when started with `sudo /etc/init.d/tomcat6 start`. No errors are thrown, everything works as expected.I used `rcconf` to try removing and reinstalling the rc scripts, this didn't help. I manually deleted all the rc scripts, then used `rcconf` again. The scripts all seem symlinked correctly to `/etc/init.d/tomcat6`, but it's just not coming up on boot. I ran `sudo grep "tomcat" /var/log/*.log` to see if something is appearing in the logs, but nothing of interest is there.
How can I verify that Ubuntu is even trying to start Tomcat? As this is a development box, I am not adverse to a quick + dirty solution if there's some either simple way of getting it started at boot. I'm thinking the next Ubuntu release will see me blow away the server and start it fresh, but right now I'd just like a working box
I am having trouble getting my FC10 with tomcat visible to the outside world. first off i am somewhat new to linux. I am running vmware workstation to host my linux web server. i have my VMWare setup to use my second NIC solely. it is bridged and the tcp/ip is disable from the host. i can ping the ip address but cant access tomcat on port 8080 from the outside. i can hit it fine from inside fedora. i have configured my router (wrt54gs with DD-WRT firmware) for port forwarding. so basically i think that the problem is somewhere in between the host and the vmware configuring allowing the port to be forwarded through.
I've got my first EC2/cloud instance of Ubuntu up and running. This is my first time really dealing with the server edition. I've loaded Apache, Tomcat, PostgreSQL, and Webmin. I've got a public IP on the instance and it is working. I've opened, for now, ports 80, 8080, 443, and 10000 to 0.0.0.0/0.
I cannot get into Tomcat Manager or Webmin at all through a browser. For Tomcat, I've restarted, stop/started, and verified that Tomcat is running. I installed Webmin all through apt-get commands so any dependencies should have been installed (first time doing it this way), but cannot get to the login screen. But if I just go to the IP, Apache goes to the "It Works." splash page. Did I miss some set up? Is there an internal firewall in Ubuntu Server edition that needs to be set?
I have tomcat 5.x installed and is running on port 80(with mod_jk setup). The directories 'manager', 'examples' and 'ROOT' were removed under /usr/share/tomcat/webapps/ and rebuilt them copying from a working tomcat server. When I acces [URL] (or) [URL], it keeps on prompting for the password even after enter correct username and password.
I just did a clean install of FC12 x86_64 and want to configure tomcat to run behind apache httpd. What is the easiest way to accomplish this? I'm a newbie at server configuration so detailed instructions would be nice
I'd like to start tomcat from eclipse, however, I get several Exceptions preventing tomcat to start. I can however start tomcat from the console, provided I do this as root :
Code: # su - # service tomcat5 start Starting tomcat5: [ OK ] And I do get the page saying that I've setup Tomcat successfully when going to http://localhost:8080 in my browser.
I want to build a NAS like mini pc to be used as a simple tomcat server (for running Jira and perhaps experimenting a bit) and as a GIT server. What kind of system requirements would I have?
Would something like this:[URL]../nas/n...sed-nas-part-2 be sufficient? And if I'd virtualized everything via VMWares would that make a lot of difference?
I just installed FC12 x86_64. After a clean install I found that httpd, mysql, svn, svnadmin, etc are already installed. I still need to install and configure tomcat running as a worker behind httpd and configure everything. But my question is about security. What do I need to do to ensure that when I start httpd and mysql that they are secure? Are there default settings that I need to change? Are there security patches I need to apply?
System Config: Fedora Core 12 x86_64 AMD Athlon II X2 250 3.0 GHz dual core GIGABYTE GA-MA785GM-US2H G.SKILL 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500) Dual Channel Kit Desktop Memory Model F2-8500CL5D-4GBPK
I am new to Linux. I installed JDK and Apache Tomcat recently but the problem is every time I want to work with them, I have to set the environment variables. I want to run tomcat as a service so that I don't have to set those system variables every time.Can it be done in any way? I am using Tomcat 5.5 and my Kernel version is 2.6.21-1.3194.fc7.
I'm sorry if this has been posted already but I REALLY did look and couldn't find the same issue(s) addressed anywhere. Similar, but not similar enough, in my opinion, to barge in and switch the subject.
Ok, I have Apache httpd set up so I can use a public_html folder inside of my /home/username directory. Now, I'm about to take a web dev course that teaches JSP/Servlets for building web applications and I'd like to set my environment up so that I can execute .jsps from my web root (/home/username/public_html) just like I would a CGI or PHP script. I have a web host that will give me JSP support for a few extra bucks a month, but I'd rather do it locally... and free.
I have Tomcat installed and running wonderfully. The test page and all the examples work fine and execute immediately. But when I try to execute a .jsp file inside of my web root (/home/username/public_html) I just get the raw Java tags and plain-old HTML rendered in my browser. I pretty much knew that wouldn't work; that'd be way too easy. I just wanted to see what would happen.
I looked through all the tomcat ".conf" files I could find to see if it was similar to setting up httpd inside of my home directory, but I didn't have any luck. It's not a file permissions problem... I've been messing with web "scripts" long enough to check that the files are executable. All of the files needed (borrowed from the examples that come with Tomcat) were in their correct paths inside of my web root, as well. Added :8080 to the end of localhost (like you do to see the Tomcat test page(s) instead of the httpd test page) but that didn't help.
I scoured the web for directions but could only find one solution that was Ubuntu-specific (just install tomcat6-user-something-or-another.deb, which doesn't exist in the Fedora repos), then I looked around here, trying every search term that seemed reasonable to me, and I can't find anything.
I realize I can just write the code and put it in a directory that does allow these things to be executed (var/lib/tomcat6/blah-blah-blah/going-by-memory) and run them from there, but I'd like to be able to just keep all of my web files in the same place; a place where I have full permission to do whatever I want... my home directory public_html.
Is this possible (has to be, right?)? Is this a dumb idea to begin with (I'm prone)? What is the best way to develop JSP/Servlets without having to deal with permissions every time I want to put a new script in a directory outside of my home directory that's already set up to allow the execution of said script?
I have been using lynx for sometime specially when on a slow connection. I was wondering if there's a way of accessing flash-based websites (completely flash-based) using lynx?
I can connect to the Internet. I can not access gmail or yahoo mail. It doesn't matter what browser I use.
If I switch to a wired connection, I can access gmail. Other wireless networks work fine.
MY router is a Belkin N, but it allows me to access other sites. The settings seem pretty vanilla, not different than wireless routers where I can access gmail.