[00:47] hi guys. anyone here good in NAT? I am trying to add a NAT rule on my AWS instance so it forwards its internal IP (+port) to the lxc container's IP + port. here is what I am trying: https://gist.github.com/developerinlondon/31b4244113373c22b056 [01:03] source47, where is the ACCEPT rule? for that nat to work? [01:04] i didnt know i needed one. i can curl to the IP locally [01:05] but just added sudo iptables -I FORWARD 1 -p tcp -d 10.0.3.95 --dport 80 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT [01:05] didnt seem to make any diff... do i have to restart? [01:12] no [01:13] added some more info - https://gist.github.com/developerinlondon/31b4244113373c22b056 [01:15] source47: The host can otherwise access 10.0.3.95 - ping, etc., ? [01:16] yes i can run curl from the host [01:16] wrong dest [01:16] eg curl 10.0.3.95:80 works [01:16] your really didn't help it [01:16] ? [01:17] iptables -I FORWARD -p tcp -d 10.0.3.95 --dport 80 -j .... [01:17] oh yes... that seemed to have messed things up now [01:17] i cant curl anymore [01:17] from host [01:18] heh [01:21] how can i get rid of that rule? [01:27] Hmm i removed it [01:27] but still cant go there anymore.. [01:30] well, your premise that rule was a problem, was wrong [01:31] source47: you say you're trying to NAT something? none of your rules are NAT, they're all just ACCEPT/REJECT [01:31] source47: can you just tell me here, in plain language, what you want to translate from/to? [01:32] oh... i took it from here https://github.com/jtopjian/lxc-nat/blob/master/lxc-nat.rb [01:32] so basically 172.31.23.17:40000 -> 10.0.3.95:80 [01:33] semiosis: You're missing "sudo iptables -t nat -A lxc-nat -d 172.31.23.17 -p tcp --dport 40000 -j DNAT --to 10.0.3.95:80" [01:34] TJ-: ah right, the list is only the filter table [01:34] semiosis: I asked for the iptables-save output; it's in a comment at the end of the gist [01:34] source47: can you add to that gist the output of 'iptables -nvL -t nat' please [01:34] ok [01:34] i see it [01:35] yea that line was added [01:36] now i have more copies of the same rule it seems [01:36] it doesnt dedupe [01:36] but the rule is the wrong way around it seems.. [01:37] source47: I think you need to discriminate on the interface too:"sudo iptables -t nat -A lxc-nat -i -d 172.31.23.17 -p tcp --dport 40000 -j DNAT --to 10.0.3.95:80" otherwise packets returning from, I presume, the other end of lxcbr0, will loop back again ? [01:37] ok let me try that [01:38] so it would be eth0 i am guessing [01:38] since thats the external interface [01:38] source47: Yes, if that's the external I/F. [01:38] in ec2 all you have is eth0 & lo [01:38] source47: Also, if you've got multiple rules in there you can delete by using "iptables -t -D ", which you can get from listing the table [01:39] oh right lxc, never mind my prev stmt [01:39] * semiosis backs away slowly [01:40] source47: I sometimes 'cheat' by doing iptables-save >/tmp/rules; ; iptables-load ah... [01:40] strange its not in --list-rules [01:41] source47: not always a good idea if you rely on the rules to keep up a remote connection though, so only use it locally for hacking about [01:41] https://gist.github.com/developerinlondon/9f5aedc140fc46937db8 [01:41] source47: did you specify the nat table? [01:42] sudo iptables --list-rules [01:42] that didnt show it [01:42] -t nat [01:42] source47: without a table specifier you only see the filter table; that's why I like iptables-save since it shows all tables and the policies, clearly [01:42] ah [01:43] ok sudo iptables -D lxc-nat 1 iptables: No chain/target/match by that name. [01:43] but i have a line with that name [01:43] well i have 4 [01:48] hmm... i guess i have to restart.. but strange i cant delete a rule with a name.. [01:51] semiosis: yea its basically to expose a service from the lxc container to the outside world. in 2 steps, first to expose it to the AWS VPC network, then i can get a proxy to forward external requests to the AWS VPC [01:56] source47: "sudo iptables -t lxc-nat -D 1" [01:56] iptables v1.4.21: can't initialize iptables table `lxc-nat': Table does not exist (do you need to insmod?) [01:59] source47: sorry... tired typo! "sudo iptables -t nat -D lxc-nat 1" [01:59] ah that worked [01:59] thanks [01:59] ok we are down to 1 rule [02:13] TJ- so u think it might be working fine locally and could be an issue with AWS firewall? [02:13] i opened the port in AWS SG also === CripperZ- is now known as cripperz [02:16] source47: is the LXC set to block anything not from the host? [02:16] not that i know of. its a standard ubuntu install [02:16] source47: does the LXC have a default route? is forwarding enabled on the LXC's default gateway? [02:16] how can i get into it using the private IP if it was an issue with the lxc? [02:17] https://gist.github.com/developerinlondon/a9d6aa72a7822caf1a62 [02:18] this is the routes in the container [02:18] it doesnt even have iptables inside [02:19] i wonder if we can find a log somewhere where it fails [02:19] source47: Is the host's lxcbr0 allocated 10.0.3.1 ? [02:19] it seems iptables might not be the issue [02:20] source47: Have you enabled IPv4 forwarding on the host? [02:20] yep 10.0.3.1 is lxcbr0 [02:20] i enabled ipv4 yes [02:21] net.ipv6.conf.all.forwarding=1 [02:21] that's ipv6 [02:21] net.ipv6.conf.all.forwarding=1 [02:21] strange [02:21] i am sure i edited ipv4 also [02:22] net.ipv4.ip_forward=1 [02:23] good [02:45] ah [02:45] DESTINATION ip-172-31-23-17.ec2.internal [02:45] that might be the issue TJ- ? [02:45] https://gist.github.com/developerinlondon/0946497f8729df17a8f5 [02:46] it shouldnt go there.. i would rather it uses the ip or resolve internally. [04:09] hiya, i have a 14.04.01 that keeps crashing and then hang at boot randomly what log is best to track down the reason? thanks. [04:13] and weirdly to look at syslog i do not have to be root or use sudo is that normal? [04:19] poobutt: indeed, most logs don't require privileges to read [04:20] sarnold: ok thanks just on another 14.04.01 server it does so i wonder why one requires sudo and one does not as they have the same set up. [04:20] poobutt: if your user is privileged it is likely part of the 'adm' group [04:21] sarnold: do you know where i would find out if the reboot was down to a power cut? [04:21] TJ: thanks one is a digital ocean server so they may have different core rules compared to a stand alone install. [04:22] poobutt: could be if some files were deleted they may have been recreated with different permissions perhaps.. [04:22] oh, I like TJ-'s explanation [04:23] poobutt: if the power is yanked, most systems won't survive long enough to write to the logs about it.. [04:24] sarnold: we do have frequent power cuts here (Thailand) so that is most probably the main reason [04:24] Power cuts in a data-center? [04:25] poobutt: can you add a UPS to your system? if you get a smart enough model you could have it power down your system gracefully if the mains are cut for more than thirty seconds, for example.. [04:25] no this is a 14.04.01 server at an office with no UPS that runs zoneminder cctv set up on it [04:25] yes UPS will be the answer but i work with NGO so always finance issues try to get best results with no budget ;) [04:26] poobutt: ahhh I misread; thought you meant the failing server was at DO [04:26] poobutt: Make sure to disable disk write caching and make sure the disk sync quickly [04:27] TJ: tahnks for the tip will implement that now [05:01] how can i update my users files from /etc/skell so that they come with right ownerships ? [05:01] like .bashrc and things like that [05:02] sed -i~kalki 's/foo/bar/g'/ /home/*/.bashrc [05:02] then re-chmod as needed [05:02] or chown rather [05:02] must be bedtime [05:04] i set root login to true and set password in preseed file. used cobbler to install ubuntu. still can not login with username root and the set password. help [05:23] Abhijit: With SSH or? [05:23] no ssh. directa access. kvm [05:25] jpds, ^ === cripperz is now known as CripperZ === kaitanya_ is now known as pokkos === pokkos is now known as neurotus [05:53] how can i make apache to server /var/www/html/server when user enters "ip"address/server? === Lcawte|Away is now known as Lcawte === yofel_ is now known as yofel [10:43] HI I would like to test udev creation of 70-persistent-net.rules. I know the file can be created during reboot, but I like to test it without reboot. Is this possible? I am using ubuntu 14.04. Thanks [10:55] Good afternoon. [10:55] rostam: udevadm [11:00] ikonia: thanks [11:12] Hello all, I have setup a little ubuntu server as a deivce that sits in between my adsl modem and router.. so that anything that connnets to the router gets routed through the ubuntu box out throught he modem to the internet. The reason being, i would like to setup an vpn (openvpn) server on the ubuntu box one for incomming vpn connections (so that i can connect to my home network when away) and one for outgoing vpn so that i can tunnel all my tr [11:12] The question i have is, i setup simple iptables for masquerading and forwarding, does however my router is the dns server.. for dns to go through the ubuntu server should i setup soemthing like dnsmasq or will iptables handle that and just forward it over to the router and back? [11:12] at the moment i have 3 iptables masquerading rules/forwarding rules, it all works but i wonder if dns is being routed directly to the router rather than the ubuntu box === chmurifree is now known as chmuri [11:27] zoidberg-: DNS should work fine... [11:31] jpds: i'm not sure what you mean by that it does work fine if i simply setup forwarding and masquerading on my linux box - but dns does no go through it, dns requests go straight to the router.. which is giving out by dhcp.. i want, to give out the ip of my linux box and have that forward requests to and from the router [11:31] so _ALL_ traffic goes through this linux box [11:31] as i want to eventually tunnel all traffic out over a vpn [11:31] including dns === a1berto_ is now known as a1berto [11:53] hi how would I know the network interface eth0 is binded to which driver? thanks === CripperZ is now known as CripperZ- [12:45] Could someone help me locate the httpd.conf file from Apache2 please? [12:45] I think it should be positioned at /etc/apache2/ dir but it is not. [12:45] webfox: the config file is now modular [12:45] so there isn't much in the httpd.conf [12:46] ikonia: I just need to activate php [12:46] then use the aenmod command [12:46] have you read the ubuntu docs on using apache ? [12:46] not yet. [12:47] Still reading https://help.ubuntu.com/14.04/serverguide/php5.html [12:47] I think thats old now. === Pici` is now known as Pici [12:50] Apache is working, just not php [12:51] webfox: why do you think it's old [12:52] it's listed as the current doc [12:52] yes, exactly. [12:54] Well, he files /etc/apache2/mods-enabled/php5.conf and /etc/apache2/mods-enabled/php5.load exists [12:54] the* [12:55] I already retarted Apache but still not executing the php inside the doc. [12:56] webfox: what is the name of the file [12:57] as in the php web page [12:57] ikonia you are good! I was using an incorrect file extension! [12:57] Thank you ! [12:57] no problem [12:57] Got it workiing now. [12:57] o/ === CripperZ- is now known as cripperz [14:14] hi, I’m trying to set up a webapp in tomcat6. This webapp needs the jdbc connector for mysql, so I installed libmysql-java. Now I’m looking for a way to make this webapp find this lib without having to copy the jar files to its lib directory, to make sure the jars are updated by package updates. I tried symlinking but that does not seem to work. Does anyone know what the proper way is? I found [14:14] https://scottlinux.com/2014/02/20/tomcat-on-debian-and-ubuntu-linux-fix-broken-com-mysql-jdbc-driver-connection/ which suggests changing /etc/tomcat*/catalina.properties to search /usr/share/java/*.jar in addition to the default places. Can anyone comment whether this is a good idea? [15:03] smoser, https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1355196/comments/46 [15:03] Launchpad bug 1355196 in linux "compiz fails with intel_do_flush_locked failed: Invalid argument" [High,Confirmed] [15:03] rtg, i knew i should not have clicked "i'm willing to bisect" :) [15:04] smwe'll build the bisects, but you have to do the testing [15:04] smoser, ^^ [15:05] yeah. its just a matter of dedicating time to that. thanks for the poitner. [16:19] Hi I have two network interface on my system eth0 & eth1. I need eth0 to bind to igb driver not e1000e. So I black list the igb and e1000 then I added those drivers in /etc/modules so the kernel tries to load igb first then e1000e. It does not work, any help greatlly appreciate. Thanks [16:20] youv'e blacklisted the igb driver when you want it to use the igb driver ? [16:23] ikonia, I have placed it in /etc/modules so the auto loading (I think) is disabled but this way I control which driver gets loaded first (or I think it gets). [16:23] but you've already blacklisted it [16:26] ikonia, okay I see your point... thx === Ursinha is now known as Ursinha-afk === Ursinha-afk is now known as Ursinha === arrrghhhAWAY is now known as arrrghhh === mjohnson151 is now known as mjohnson15 [18:19] Alright, having just completed two rounds of do-release-upgrade, I am having a mild reaction to cron.d/php5 emailing me twice an hour with a message concerning invalid argument. I determined the cause of this is a missing value in the response from /usr/lib/php5/maxlifetime. Changing the she-bang to -x instead of -e leads me to allow_call_time_pass_reference being no longer available. How to fix it? [18:34] HI please help I am stuck with this for last 2 days. I am using ubuntu 14.04 update 1. My system has two network interfaces , eth0 and eth1. I see sometimes eth0 bind to hardware interface where eth1 was previously bind to it. The system generates /etc/udev/rules.d/70-persistent file. I have modified the bus but it overright it, any idea why please? thx === Guest64178 is now known as med_ === med_ is now known as medberry === Ursinha is now known as Ursinha-afk [19:35] When running dpkg-reconfigure postfix and setting where root's mail goes, where is this setting stored? Its not in /etc/aliases and grepping around hasn't found it === Ursinha-afk is now known as Ursinha === Ursinha is now known as Ursinha-afk === Ursinha-afk is now known as Ursinha === cripperz is now known as CripperZ- [20:35] qman__: that _should_ update /etc/aliases [20:35] if not, please file a bug with details [20:42] Hi all [20:42] Is possible to know if a connection are using ssl or not? netstat -an show me many and I would like to know what that connections are secure( using ssl). [20:47] plm: Maybe use -nt [20:49] I know of no such tool; you could probably write a pcap thing that recovers a few kilobytes of data from each active connection and runs some simple statistics on it to ensure the data looks 'random'.. [20:54] lamont: it didn't, will do [20:54] On two 14.04 servers [20:54] genii: -nt show just tcp (with or not ssl) [20:55] genii: dont need to be netstat. Any other app/method to kwno if that connection are using ssl or not [20:56] To actually test the traffic you'd need to set something up on another machine like for instance mitmproxy [20:56] !info mitmproxy [20:56] mitmproxy (source: mitmproxy): SSL-capable man-in-the-middle HTTP proxy. In component universe, is optional. Version 0.9.2-2 (trusty), package size 150 kB, installed size 800 kB [21:07] lamont: bug 1358925 [21:07] Launchpad bug 1358925 in postfix "root alias does not get set" [Undecided,New] https://launchpad.net/bugs/1358925 [21:07] qman__: ta [21:08] it may take me a day or 7 to look at it, feel free to pester me if I haven't done anything with it by next week. Likewise, someone server-teamish is likely to beat me to it. [21:09] No problem, I just thought I was crazy for not being able to find it, utrns out its broken === _ruben_ is now known as _ruben [21:34] genii: I'm using tcpdump but I not see difference between a tcp connection with and without ssl === mjohnson151 is now known as mjohnson15 === Lcawte is now known as Lcawte|Away