# Team City on FreeBSD



## wisdown (Jul 24, 2016)

Hey guys,

I am willing use Team City and other JetBrains applications for personal and casual development of plugins to my blog and some apps also.

The goal is have an remote development area available online, so I can access this space from any freelancer, university, lan-house, etc...

I already have an basic FreeBSD structure runing VMs (Virtual Machines) on VMware at home as Multihomed Server, like:

1 DNS Server Authoritative
1 DNS Server Secondary
1 DNS Server Forwarder
1 Web Server Apache (runing my public personal blog)
1 Database Server MariaDB

My question is bout how to get the desired scenario focusing in security?

Reading the TeamCity documentation, seems I need have Tomcat Server, so from this point I got question about what should be the best approach?

Make an new VM only for Tomcat?

or

Install Tomcat on my current Apache Server?

The next doubts about how to get the desired scenario working focusing on security:

If I make an VM for Tomcat its safe let it public?

or

Should I make an private link in my blog to access it?

I am accepting suggestions for alternatives softwares also.

Thanks in advice for all help.


----------



## drhowarddrfine (Jul 24, 2016)

Why don't you just use ssh or git?


----------



## wisdown (Jul 24, 2016)

drhowarddrfine said:


> Why don't you just use ssh or git?



Thanks for the reply drhowarddrfine!!!

Mostly places where I will be block all ports including ssh, the common allowed port is 80 and sometimes the traffic is checked for be sure people are not abusing on that port.

So for be sure I will be able to access from those and other places, I am looking for something online in the default format of webpages on port 80.


----------



## Phishfry (Jul 24, 2016)

Port 80 is typically only used for unencrypted http. Most filtered internet also includes Port 443 which is what you want to try.
https://www.reddit.com/r/linux/comments/1aok5j/does_everyone_use_ssh_over_port_443_to_bypass/

Checkout some ways to do it with github.
https://help.github.com/articles/using-ssh-over-the-https-port/


----------



## Phishfry (Jul 24, 2016)

The putty tool has some cool cert based stuff built in as well for more secure SSH access.
Here are the weaknesses.
https://labs.mwrinfosecurity.com/blog/abusing-putty-and-pageant-through-native-functionality/


----------



## SirDice (Jul 25, 2016)

For a client I got TeamCity working. No need for Tomcat, there's one supplied and it works just fine. If you download the Linux version you can easily run it on OpenJDK7. The only thing I changed was the startup scripts, I wrote a couple of proper FreeBSD rc(8) scripts for it.


----------



## wisdown (Jul 25, 2016)

*@Phishfry*

Yes 80 and 443 are allowed, I will check about setup ssh over https this sounds pretty cool, thank you.

*@SirDice*

I will try setup and test VM without Tomcat, I have no experience on TeamCity, was searching for some solutions and after read a bit seems the personal version and the integration with they other products have more then I need, because this started study they install documentation.
Thanks for point where to start, I was lost thinking in how to integrate my current apache with an external tomcat, by the way, if is possible only add OpenJDK7 this is pretty easy.
To rc(8) I will start an try catch tests to get it working.


----------



## drhowarddrfine (Jul 25, 2016)

wisdown Now wait a minute. You just told me earlier you couldn't use ssl and you specifically only wanted to use port 80.


----------



## SirDice (Jul 25, 2016)

wisdown said:


> I will try setup and test VM without Tomcat, I have no experience on TeamCity, was searching for some solutions and after read a bit seems the personal version and the integration with they other products have more then I need, because this started study they install documentation.


I recommend extracting the TeamCity archive to /opt/ so you get /opt/TeamCity/* and work from there. The supplied start script should work for testing purposes. I only created proper rc(8) scripts for the server and agent so it's easier to stop/start the services. It's not entirely working correctly, my scripts sometimes have a bit of a problem shutting down. But besides that TeamCity itself appears to run correctly.


----------



## wisdown (Jul 25, 2016)

drhowarddrfine said:


> wisdown Now wait a minute. You just told me earlier you couldn't use ssl and you specifically only wanted to use port 80.



Sorry, my fault, I would have say only the default port are available to me like 80 and 443.


----------

