/srv/irclogs.ubuntu.com/2015/10/24/#ubuntu-server.txt

R2D2WarriorHello, i am getting a connection reset error when trying to connect to my apache server (running on an ubuntu machine next to me) from outside my of LAN but works fine locally. port 80 is open and dns is set up and working. netstat lists apache as tcp6 on port 80. i've researched this a ton with no luck. what else can i try?00:31
patdk-lapwhat does open mean?00:32
patdk-lapif it's reset it is not open00:32
R2D2Warriorforwarded in my router's control panel to the ubuntu pc00:33
patdk-lapwhat does tcpdump show on your machine?00:33
R2D2Warriorreset?00:33
patdk-lapyou are the one that said connection reset00:33
patdk-lapconnection reset != open00:33
R2D2Warrioroh really? odd00:34
R2D2Warriorsorry, how do i use tcpdump?00:34
R2D2Warriorstill new, long time windows user00:35
sarnoldR2D2Warrior: are you trying to forward tcp6 port 80 to tcp6 80? or tcp 80 to tcp6 80?00:35
R2D2Warriori didn't forward anything with tcp600:36
patdk-lapmost likely it's the dual bind ipv6 port 80 he sees00:36
patdk-lapnot ipv6 specific00:37
R2D2Warrioryes that's what i read00:37
sarnoldahh00:38
=== markthomas is now known as markthomas|away
=== quantic_ is now known as quantic
=== Uptime is now known as irrreverant
=== irrreverant is now known as Uptime
lordievaderGood morning.08:19
jonahHi I wondered if anyone could please advise. I've been in and out of here a few times as I've just built my own server. I'm looking at using it as LAMP apache server mainly to host a few sites, set up some user accounts for them to host a few and also run owncloud. Currently I managed to set up ubuntu 14.04.3 with a RAID10 across 4 x 1tb hard drives. But I couldn't include grub in the raid so that had to be on its own partition on each drive.08:25
jonah This boots fine, but I've not really partitioned anything as I would like to for security. I also have a spare SSD which I could use (maybe for Grub?) or could get another SSD later and somehow then add a RAID1 over the two. I just need advice on how to partition everything properly and partition sizes. I though maybe re-do the raid10 as just the /home and put everything else on the SSD with automatic guided partitioning from the installer.08:25
jonahOr should I do something else? Anyone that can please help, I've read all sorts but in the end you just get more confused and unsure!!08:25
lordievaderjonah: The way you partition your disks really depend on what you want to do with them. This is one of the reasons I like LVM so much it gives you the flexibility to start out with some kind of configuration that may change a lot in the future. Normal partitions are rather static in comparison.08:28
jonahok, so from the ubuntu installer would I just partition the SSD for grub (with bootable flag), do a 1 big massive RAID10 across the other discs then click to install LVM? Is it safe in terms of drive failure and also security for a web server?08:29
lordievaderI'd let lvm do the raid stuff too. How does security come into play with raid setups?\08:31
bekksWouldnt you need a dedicated log volume for persistent mirroring via LVM?08:31
lordievaderIt creates a metadata volume for your raid, if that is what you mean.08:32
bekksYeah.08:33
lordievaderFor my raid1 over two disks I get two _image volumes and two _meta images. These are normally hidden, but they are there.08:34
=== Lcawte|Away is now known as Lcawte
jonahthanks but I'm not really sure on LVM... Do I just choose it at install instead of raid then and it can set up raid still or do I still have to make the raid arrays and partitions first?08:41
lordievaderjonah: https://wiki.gentoo.org/wiki/LVM If you skip the Gentoo specifics it is great documentation, for Ubuntu too.08:47
mripguru_lordievader :)09:23
jonahlordievader: thanks but although LVM sounds very good for future adjustments to parition sizes etc, I'm still not sure what my initial steps should be with the drives I have to get ubuntu server running. From the installer what do I need to partition, raid or make bootable etc. Or can I just add LVM to what I have already running with my raid10 setup?09:26
lordievaderjonah: The way I have it for my raid drives is two partitions on the drives. The first /boot (raid1 using mdadm), the second is the pv for lvm.09:31
=== asac` is now known as asac
=== subvhome__ is now known as subvhome
subvhomehello all… I'm having a bit of a problem with my ubuntu server and IPTABLES. so my server is public facing with 2 network cards. one for LAN and one for WAN. I configured my WAN with 2 IP's lets just say they are 67.1.1.1 and 67.1.1.2 … both are pingable from the internet and I have port 22 open .. this being done via IPTABLES. What I am trying to achieve is when 67.1.1.2:3001 gets accessed from the WAN side, traffic should11:49
subvhometranslate to 10.0.0.231:3001 on my LAN side.  I must say that I did not create this server and who ever set it up has been using webmin for tweaking IPTABLES.. so I have been just making manual changes to the IPTABLES rules file located /etc/iptables.up.rules since webmin interface confuses me.11:49
lordievader!webmin11:50
ubottuwebmin is no longer supported in Debian and Ubuntu. It is not compatible with the way that Ubuntu packages handle configuration files, and is likely to cause unexpected issues with your system.11:50
lordievadersubvhome: See ^. How are your nat tables configured?11:50
subvhomei agree.. so lets just leave it out of the equation..11:50
subvhomeaccept all and postrouting i have masquerade from my wan iface.. please excuse if i sound like i don't know what I am talking about.. this happens to be true :)11:53
subvhomehttp://pastebin.com/tF74v9nb11:54
lordievadersubvhome: So you are missing the forward rule for 10.0.0.231:3001.11:54
subvhomefrom inside mynetwork if i telnet 10.0.0.231:3001 the connection is created.. when i tried the forwarding rule and attempt to connect to 67.1.1.2:3001 I get a timeout..11:55
lordievaderFor example I have "-A PREROUTING -i br-ext -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.0.1.21:443" to forward traffic from the 443 port.11:55
subvhomelet me show you what i have tried so far11:55
subvhomelet me play with that11:56
subvhomethis would go right in between line 35 and 36 right?11:56
subvhomein my paste11:56
subvhomeim sorry11:56
subvhomeabove 711:56
subvhome?11:57
lordievadersubvhome: Your prerouting table is empty, it will be the first rule in that table.11:58
subvhomeI don't have a prerouting table.. do i create one?12:00
subvhomei just have nat mangle and filter…12:00
lordievadersubvhome: It should be there. 'sudo iptables -t nat -vnL'.12:01
subvhomeoh you mean my prerouting chain is empty12:02
subvhomein my nat table12:02
subvhomeok i think i understand let me try it12:03
subvhomeok.. so i see it when i run -t nat -vnL12:05
subvhome.. but when i try to telnet the connection is dropped immediately12:05
subvhomeis because I have that rule for established or related connections?12:06
lordievaderYou don't seem to allow the forwarding of the 3001 syn packet.12:07
lordievaderAlso is ipv4 forwarding enabled?12:07
subvhomeyes ipv4 forwarding is enabled12:08
subvhomecheck this paste.. its all my rules outputted by iptables -vnL command for both filters and nat12:08
subvhomehttp://pastebin.com/xShjYGhN12:08
subvhomejust realized something.. i don't have eth0 let me make that change12:10
lordievaderYou have three interfaces? eth0, em1, p255p1?12:10
lordievaderAh...12:10
subvhomeok.. so now it doesn't refuse the connection.. but just sites there timeing out.12:11
subvhomewhats this syn packet you mentioned.. i was playing around with DNAT and SNAT12:11
subvhomebut got really confused.12:11
subvhomei don't see anything in the logs either.12:14
`jpgHey guys, I am experiencing some problems building AMIs based on the ubuntu cloud-image AMIs.12:15
lordievadersubvhome: Tcp dump on the endpoint, do you see an incoming connection?12:15
`jpgBasically I use packer to run a shell script to configure apt and install the vivid kernel etc.12:16
`jpgHowever I am running into this: https://github.com/flynn/flynn/issues/182912:16
subvhomelordievader: what would be the syntax of that command?12:17
`jpgI have no clue how I end up with a situation where thermald is not installable given the script configures the main repository correctly.12:17
lordievadersubvhome: tcpdump -i <some interface> 'tcp && port <some port>'12:17
`jpgDoes anyone know if there is anything beyond cloud-init that could be interfering with apt? Or have a link to the tools/etc that build the cloud-image AMIs?12:18
subvhomei get listening on em1.. link type and cap size12:19
lordievadersubvhome: Do you see incoming connections?12:19
subvhomei ran sudo tcpdump -i em1 'tcp && port 3001'12:19
subvhomewell thats the thing.. on the destination device.. its really dumb and I can't see if its has any connections on it. i would normally test by telneting to the port from within the local network.12:20
subvhomenow i figure if i don't get the same results from outside my network.. then the connections are not being established.12:21
subvhomeits some sort of handscanner12:21
lordievaderAh, I see how that makes things difficult...12:22
subvhomeyea … but shouldn't it.. in theory.. that if i can establish a connection via telnet within the network.. a working iptables rule would allow the same type of results from the outside?12:23
lordievadersubvhome: Yes, if the firewall/nat is configured correctly.12:23
TJ-subvhome: sounds like the device doesn't have a default route set, so only 'knows' the local network12:24
TJ-subvhome: If it is behind a NAT/router then it ought to be fine though12:24
subvhomeok.. so we had a sonicwall handling this and it was working a few months ago.12:24
subvhomeand not long before i took over… the sonicwall died and someone created this server to handle dhcp and to act as a firewall12:25
subvhomewhich i like the idea over a sonicwall but it did work..12:25
subvhomei just need to create the rule that if hit a virtual interface ip (67.1.1.2) on port 3001 it will direct the traffic to 10.255.230.231:300112:26
subvhomethats a real lan ip.. and a fake public ip :)12:26
subvhomenow aside from it having webmin installed… the server runs great and i have been able to do great things with it.. but this one has me stumped.12:27
subvhomeand i don't like to use the webmin interface…  so i try to just manage the rules manually12:27
TJ-subvhome: test if the device has a default route (create a temporary private subnet) and see if it can reply to that. If not, then the device has no default route, in which case you'll have to NAT in front of it12:28
subvhomethe original ip was 67.1.1.1 and it is pingable from the outside world.. pinging it right now and also ssh into it right now. 67.1.1.2 is also live pingable and accessible via ssh. there are no routes setup on this current configuration.. which is what i am trying to do..12:29
subvhomei think lordievader was on the right track with me.. what did you mean i didn't have 3001 syn packets?12:29
lordievaderWell your forward table didn't say much about connection to 10.255.230.231, so I wondered if that table didn't simply drop the packets.12:30
subvhomehttp://pastebin.com/xShjYGhN from this paste.. i don't have anything in FORWARD regarding that.. so what should be in there12:31
subvhomeall i have is that it will allow connections back once they are established or related12:32
subvhomewhich is how it should be right?12:32
lordievaderThe easiest would be to modify rule 2 to allow all, not just RELATED and ESTABLISHED. Then later secure this more...12:32
subvhomeif I allow all doesn't that leave me wide open?12:33
subvhomeit worked12:35
subvhomebut i don't like the idea of it allowing all connections..  how can i leave rule 2.. but add another rule to just accept connections coming in on 67.1.1.2:300112:35
subvhometo 10.255.230.231:300112:36
lordievaderSure.12:36
TJ-Ahhh, I hadn't seen that info earlier12:43
TJ-Trying to multitask this and making 70+ apple pies :D12:43
subvhomeok.. so im trying to add a rule in the forward… to allow this connection and still keep my network safe12:45
subvhomeits not working12:45
lordievadersubvhome: How are you testing this exactly?12:45
subvhomewith telnet from outside the network.. when i remove the established and relative states.. the connection is established12:46
lordievaderWhat EST,REL states, the one in the forward table?12:47
subvhomehttp://pastebin.com/FWK3EqM812:49
subvhomethis is what im trying to play with12:50
subvhomelordievader: yes.. when i remove EST and REL in forward chain… the connection is established.12:51
lordievaderHmm, that is odd. I'd add a couple of log rules to see what is being dropped.12:52
subvhomeim going to take a bit of a break.. and regroup my brain. thanks a lot bro12:53
subvhomewhats up #ubuntu-server16:29
patdk-laphopefully everyones servers16:33
subvhomelordievader: i don't know what happened… it stopped working..16:41
subvhomelordievader: i guess nothing happened.. i can't even telnet into the device from my lan.. Maybe I DoS'd it lol16:42
lordievadersubvhome: Restart the device?16:46
subvhomeyea.. i gotta call someone in cali for that.. no big deal. I guess learning the fundamentals of establishing a link to the device was learned. I'm going to setup an ftp server on machine and attempt to do the same thing.16:47
subvhomemy goal now will be not to have my FORWARD chain so unprotected16:48
lordievaderErr, ftp?17:31
lordievaderDon't use ftp...17:31
subvhomelordievader: i figured that you mean there are too many ports involved lol..brb18:14
lordievaderNo... ftp is old, insecure, crap and shouldn't be used.18:15
lordievaderFtps is slighly better, but from what I hear, hell to set up. sftp is a lot better. But I'd go with scp over (s)ftp(s) any day.18:16
RoyKlordievader: ftps doesn't work with nat, though18:23
lordievaderAnother reason not to use it ;)18:23
RoyKlordievader: and scp is like sftp18:23
RoyKor rsync over ssh18:24
lordievaderI know ;)18:24
RoyKftp hands over ports and ip addresses in L7, so if it's encrypted, the NAT router can't figure out which ports to open18:25
=== unreal_ is now known as unreal
=== Darkman802_ is now known as Darkman802
DelemasJust upgraded a server to 15.10. Anyone else having their Apache2 webservers ONLY listen on tcp6 after upgrade?19:07
DelemasNevermind. Somehow ssl_module wasn't being loaded after upgrade.19:13
=== subvhome_ is now known as subvhome
=== armyriad2 is now known as armyriad
subvhomehaving a hard time with this.. so i setup a webserver and I am able to access it from a specific public IP and forwards to a specific server hosting the http site.. but only if I allow all forwarding packets from WAN to LAN in my IPTABLES… i want to still be able to only allow EST and REL connections in my forwarding chain … how can i do this…  here are my iptables -vnL outputs and my rules (I've masked my IP)20:58
subvhomehttp://pastebin.com/3R7UfEfE20:59
subvhomein the FORWARD chain, i want to not have to remove REL and EST20:59
subvhomelordievader: I want to thank you.. you have given me a lot of insight and I actually managed to accomplish something I have been trying to figure out for about a week. I feel like removing the REL and EST states leaves my system vulernable.21:01
Seveassubvhome: you don't have to remove the related/established rules, but you will have to add a port 800 rule21:32
Seveas8000*21:32
Seveassomething like iptables -A FORWARD -o p255p1 -i em1 -p tcp --dport 8000 -j ACCEPT21:32
Seveasthe input chain is not used for that traffic, as you can see by that counter being 021:33
subvhomethanks for that.. i will look into it...22:03
=== setkeh is now known as KiraYameto
=== KiraYameto is now known as setkeh
subvhomeSeveas: brilliant22:37
=== Lcawte is now known as Lcawte|Away

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!