iptables NAT table not matching anything I am attempting to take a TCP service running on port 1234, and make it appear as if it's running on port 81. I thought the following might do it:  iptables -A PREROUTING -t nat -p tcp --dport 81 -j REDIRECT --to-port 1234   However, if I fire up nc -l 1234 in one terminal, then nc 127.0.0.1 81 in another, I don't get a connection. The second nc just exits immediately. tcpdump tells me:  $ sudo tcpdump -i lo -v tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes 07:54:21.628583 IP (tos 0x0, ttl 64, id 60458, offset 0, flags [DF], proto TCP (6), length 60)     localhost.45729 &gt; localhost.81: Flags [S], cksum 0xfe30 (incorrect -&gt; 0x06a3), seq 4232210875, win 43690, options [mss 65495,sackOK,TS val 755089 ecr 0,nop,wscale 6], length 0 07:54:21.628595 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)     localhost.81 &gt; localhost.45729: Flags [R.], cksum 0x98dc (correct), seq 0, ack 4232210876, win 0, length 0   Looks as if the connection is attempted, then immediately reset. I see there's an incorrect checksum -- is that a problem, and if so, how do I fix it?  The other nc is listening on port 1234, as verified by netstat and attempting to connect to port 1234 directly, successfully.  Oddly, nothing seems to be matching PREROUTING the nat table at all:  $ sudo iptables -t nat -L -n -v Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)  pkts bytes target     prot opt in     out     source               destination              0     0 REDIRECT   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:81 redir ports 1234  Chain INPUT (policy ACCEPT 0 packets, 0 bytes)  pkts bytes target     prot opt in     out     source               destination           Chain OUTPUT (policy ACCEPT 2 packets, 120 bytes)  pkts bytes target     prot opt in     out     source               destination           Chain POSTROUTING (policy ACCEPT 2 packets, 120 bytes)  pkts bytes target     prot opt in     out     source               destination            Note the 0 counters, despite my multiple attempts to make the connection with nc above. Now, it's my understanding that all traffic should be going through the PREROUTING chain, so I should see something. What gives?
iptables port redirect not working for localhost I want to redirect all traffic from port 443 to the internal port 8080. I'm using this config for iptables:  iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp \          --dport 443 -j REDIRECT --to-ports 8080   This works for all external clients. But if I'm trying to access the port 443 from the same maschine I'll get a connection refused error.  wget https://localhost   How can I extend the iptables rule to redirect local traffic too?
Is there a way of maintaining malleability in a homomorphic encryption system while making it infeasible to perform chosen ciphertext attacks?   I have been reading about homomorphic encryption and malleable cryptosystems lately and have found it fascinating. I still have a lot of reading to do, however, I came across a statement in my reading that suggested malleability is inherently counter to security against chosen ciphertext attacks.  While I read up more about this relationship, I am curious to learn if there a way to maintain malleability while making a chosen ciphertext attack computationally infeasible? Why or why not? How to change Function (Fn) Key behavior on wireless Logitech keyboard What is the best way to represent show and hide in icons? I have a web page that has a list of columns of information.  All columns have names and then some of the columns have items in them.   I want to have an icon to represent   Hide all empty columns Showing all columns   All of the icons i see for hide look like "delete" so i want to see if there are any representations of "hide" icons that don't look like delete.  And for "show" the only thing i see is an eye graphic which doesn't seem very intuitive to me.  Does anyone have any recommendations for good "hide" and "show" icons? Overriding the final destination of the OAuth2.0 flow from a custom OAuth2.0 Auth provider Background:  I have created a custom Auth. Provider in Salesforce to reach out to an authorization server that isn't on the default list of Provider Types. I used  as a good starting point to extend the Auth.AuthProviderPluginClass. Once appropriately added to my org, it then became an option on the list of Provider Types. I was able to create an Auth. Provider using that new provider type and it works to initiate the OAuth2.0 flow. I am appropriately able to get the access token and refresh token from the authorization server.  The Problem:  As it currently stands, we will have users click on a button that will send them to the provided "OAuth-Only Initialization URL" link that was generated when I created the actual Auth. Provider record. The trick is that when the OAuth2.0 flow is completed, the user is redirected back to the Salesforce Setup Home page, and I don't see a good way in the documentation to override the final destination to be something else (like a success page or something).  Question:  Does anyone know of a way to override the final destination of the OAuth2.0 flow from a custom OAuth2.0 Auth provider?    UPDATE: I tried using the startUrl (and also tried retUrl for good measure) as query params, but doing so didn't change the behavior after the OAuth2.0 flow finished.  Meaning, both of the following URLs gave me the same final destination as not having any query params at all:  https://&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?retUrl=lightning%2Fpage%2Fhome   https://&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startUrl=lightning%2Fpage%2Fhome     Another Update: This WORKED:  https:/&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startURL=%2Flightning%2Fn%2FCustomPage   Apparently, it was important to add the leading /, (of course, url encoded to be %2F) and %2Flightning%2Fpage%2Fhome gets interpreted as the setup home and sends you there.    (Parallel posted to Salesforce Dev Forum: ) Can you make multiple "if" conditions in Python? I'm using the beamer miniframes theme (with subsection=false) and the compress option. Currently the navigation shows the dots for each subsection side-by-side. I would prefer if there would be a horizontal space (e.g. with the width of a dot) between the dots of each subsection. Is this possible? Right now it looks like:  Section 1 oooooo  And I would prefer it to look like:  Section 1 ooo ooo  MWE: \documentclass[compress]{beamer}   \useoutertheme[subsection=false]{miniframes}   \begin{document}   \section{Sec 1}   \subsection{}   \begin{frame}[t]     hi   \end{frame} \subsection{}   \begin{frame}[t]     hi   \end{frame} \end{document}` What's a recommended alternative to Quickbooks pro? I've just installed Ubuntu to replace Windows. I can't seem to find a good alternative to  to run on Ubuntu. Any help would be appreciated. Recently upgraded to Ubuntu 18.10, having two problems.  Easiest to explain: when I open "settings", go to "privacy", select "screen lock", I get the popup window with the screen lock settings, but everything is grayed out:   Second issue: If I step away from the machine for long enough (seems to be 5 minutes), the screen blanks. Hitting a key or moving the mouse wakes it up. But when it wakes up, the only things on the screen are the icon bar at the left and the top bar with status icons on the right end. The rest of the screen is blue, not my normal lock screen image. The screen isn't locked, it doesn't prompt for a password, it's just...blue.  I can move the mouse pointer around the screen, the icons react if I click on one, I can bring up the popup with volume/brightness controls on the top bar. But if the pointer is on the blue background, neither left nor right button clicks do anything.  Now, if I press ctrl-alt-F1 from there, I get a lock screen where I can enter my password. Then I get the blue screen back, but if I press ctrl-alt-F2 I get my normal screen (with running applications) back.  ctrl-alt-F2 without going through the lock screen first does nothing.  I'm not finding anything while searching that matches either of these sets of symptoms. Suggestions? Recently, the TeX.SE question  got onto the Hot Network Questions list.  Like many questions on TeX.SE, it contains some TeX markup in its title.  Unfortunately, on , this markup gets parsed and rendered as math:    I propose that either:   the entire Hot Network Questions sidebar should be excluded from MathJax parsing by styling it with the tex2jax_ignore class, or at least, any hot questions from TeX.SE should be so excluded from MathJax parsing.   Or I suppose we could always implement , which asks for all questions with TeX in the title to be excluded from Hot Network Questions entirely.  That might be throwing out the baby with the bathwater, though.    Ps. This issue is partially masked by , which causes MathJax not to be rendered in many elements that are hidden by default and revealed using jQuery .show(), such as all but the first five questions in the Hot Network Questions sidebar.  The  user script contains a generic fix for that bug, so users who have it installed will see this issue more frequently, but it occurs even without SOUP whenever a question with TeX markup in the title happens to show up among the top five hot questions that are always visible by default. Use (or non-use) of articles before abstract nouns How do I echo and send console output to a file in a bat script? Why is $R\cos{a} = mg$ in circular motion compared and not $R = mg\cos{a}$? Normally, if an object of mass $m$ is inclined to the horizontal at an angle $b$, we set the reaction force of the object on the inclined plane as $R = mg\cos{b}$ (if we resolve the force of gravity so the line of action coming out of the plane is perpendicular to it).  However in circular motion*. it's assumed that $R\cos{b} = mg$. In the example above, one would have to do this in order to arrive to the correct answer, instead of $R = mg\cos{b}$. Using $R = mg\cos{b}$ seems natural enough, as I am resolving vertically, however, both equations would produce two different values for $R$. Why is this?   To show what I mean: If we set the reaction force in this question as $mg\cos{a}$, then the centripetal force will be $mg\cos{b}\cos(\pi/2-b) = mg\cos{b}\sin{b} = \frac{1}{2}mg\sin(2b)$   Whereas If we use $R\cos{b} = mg$, $R = mg\sec{b}$ and the centripetal force will be $mg\sec{b}\sin{b} = mg\tan{b}$. This will end up with two different values for the radius of the circular motion, and hence two different final answers.  *In the circular motion questions I've seen in my mechanics module Installing nvidia drivers on 18.04 Let $f:\mathbb{R}\to\mathbb{R}$, $f(kx)=f(x)$. Show that if $f$ is continuous at $0$ then $f$ is a Constant function Let $f:\mathbb{R}\to\mathbb{R}$ , there is $k \in \mathbb{R}$, $|k|\ne 1$, so that for every $x\in \mathbb{R} , f(kx)=f(x).$ Show that if $f$ continuous at $0$ then $f$ is a constant function.   I tried to find something to show it from the definition of continuous function but I didn't know how to continue. We have that $f$ continuous at $0$ if for every $\epsilon&gt;0$ there is $\delta&gt;0$ such that $|x-0|&lt;\delta \implies |f(x)-f(0)|&lt;\epsilon$ And if $f$ not continuous on $0$ is $f$ still a constant function? Insert a "Let us continue this discussion in chat" comment before thread gets messy I've seen , but there seem to be no proper solution.  I suggest an ability to insert a "Let us continue this discussion in chat" comment before the thread gets messy enough to fit the requirement. The point is to prevent the problem before it occurs.  Perhaps this should become a privilege for users of X reputation or more?  Your opinions on the subject? How to make a series of rectangles follow a pen path I am trying to get a series of shapes (rectangles) to follow a path (sine wave) that I made with the pen tool, but I have no clue how to do that or if it is possible.   I have tried warping a rectangle into the sine wave path, but it takes many different warped rectangles and it isn't smooth.  I thought  might work for rectangles, but it only works for text. Let's say I have some data, and then I fit the data with a model (a non-linear regression). Then I calculate the R-squared ($R^2$).  When R-squared is negative, what does that mean? Does that mean my model is bad? I know the range of $R^2$ can be [-1,1]. When $R^2$ is 0, what does that mean as well? What makes you lose the Field Upgrade Score? When playing in a squad, you can get "Field Upgrades". However, sometimes when I die, it tells me that I have lost the "Field Upgrade Score".   Where can I see this score and what are the events that make me lose it? Help evaluating a gamma function If a function maps every connected set onto a connected set, is it necessarily continuous? I know the converse is true.