LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-20-2019, 04:21 AM   #1
intmail01
Member
 
Registered: May 2013
Posts: 91

Rep: Reputation: Disabled
Privoxy can not listen address 127.0.0.3 -- NAT filtering


Hi,

I use privoxy server which listen to the IP address 10.0.0.1:8118 on wlan0 interface. In normal use any client can access the server.

This IP/interface is not always in use and sometimes down then privoxy wont run when an listen address does not exist.
I need privoxy always running because some program use it in other interfaces then I use a trick to have permanent IP.

The trick is I try to use another permanent IP 127.0.0.3:8118 then route 10.0.0.1:8118 traffic to it. I set privoxy to listen 127.0.0.3:8118. The NAT filtering are:

Code:
iptables -t nat -A PREROUTING  -i wlan0 -p tcp -m multiport --destination-ports 8118 -j DNAT --to-destination 127.0.0.3:8118
iptables -A FORWARD -i wlan0 -p tcp -m multiport --destination-ports 8118 -d 127.0.0.3 -j ACCEPT
It does not work once the wlan0 is up, remote client can not access internet. Could someone tell my why ?
 
Old 07-24-2019, 03:04 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Do you mean that privoxy will exit when IP address is gone or interface is down?
 
Old 07-24-2019, 03:14 PM   #3
intmail01
Member
 
Registered: May 2013
Posts: 91

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
Do you mean that privoxy will exit when IP address is gone or interface is down?
Yes. User manual says "If the specified address isn't available on the system, or if the hostname can't be resolved, Privoxy will fail to start."
 
Old 07-26-2019, 03:25 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Quote:
Yes. User manual says "If the specified address isn't available on the system, or if the hostname can't be resolved, Privoxy will fail to start."
The fail to start doesn't mean that it will exit. It should be Ok. If IP address or interface is gone, your solution can't solve the issue too. Traffic still is failure.

Last edited by nini09; 07-26-2019 at 03:27 PM.
 
Old 07-30-2019, 07:04 AM   #5
intmail01
Member
 
Registered: May 2013
Posts: 91

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
The fail to start doesn't mean that it will exit. It should be Ok. If IP address or interface is gone, your solution can't solve the issue too. Traffic still is failure.
It will exit. To check it run command:
Code:
 ps -aux | grep privoxy
 
Old 08-02-2019, 04:49 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Which one cause exit, listen address or hostname?
 
Old 08-03-2019, 09:21 AM   #7
intmail01
Member
 
Registered: May 2013
Posts: 91

Original Poster
Rep: Reputation: Disabled
There is no hostname in my configuration file of privoxy, just listen-address
 
Old 08-06-2019, 02:30 PM   #8
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You are better to specify the hostname. For your case, it could cause exit if hostname resolve is failure.
 
Old 08-07-2019, 04:39 AM   #9
intmail01
Member
 
Registered: May 2013
Posts: 91

Original Poster
Rep: Reputation: Disabled
which hostname ? all are IP address
 
Old 08-07-2019, 02:26 PM   #10
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
7.3.3. hostname

Specifies:

The hostname shown on the CGI pages.
Type of value:

Text
Default value:

Unset
Effect if unset:

The hostname provided by the operating system is used.
Notes:

On some misconfigured systems resolving the hostname fails or takes too much time and slows Privoxy down. Setting a fixed hostname works around the problem.

In other circumstances it might be desirable to show a hostname other than the one returned by the operating system. For example if the system has several different hostnames and you don't want to use the first one.

Note that Privoxy does not validate the specified hostname value.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dig output shows NOERROR but no IP and privoxy claims NXDOMAIN ( privoxy OFF) linuxStudent11 Linux - Networking 0 04-27-2011 10:45 PM
Edit privoxy files directly from the web location... 127.0.0.1. Permission denied. RHLinuxGUY Linux - Networking 4 04-29-2009 08:00 PM
Privoxy - "Privoxy is not being used" from http://www.privoxy.org/config/ slimjim Linux - Networking 1 03-12-2007 11:07 AM
apache security for intranet: "listen 80" vs. "listen 127.0.0.1:80" pulper Linux - Software 3 09-27-2006 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration