LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-30-2001, 08:21 PM   #1
dangel
Member
 
Registered: Nov 2001
Location: atl
Distribution: redhat
Posts: 52

Rep: Reputation: 15
transparent proxy


Hello all. I want to port forward all connections going OUT on 80 to 3128 on another box. My gw is 192.168.1.1 with the firewall rules. I'm still using ipchains and ipmasqadm (iptables gave me hell when I tried to do ANY port forwarding =(
My proxy server is .1.2

Here is what I have right now. I have tried several things - but nothing has seemed to work:

# Port forward web traffic through the proxy server
ipchains -A input -p tcp -s 192.168.1.0/24 80 -d 0.0.0.0/32 80 -m 1
ipmasqadm mfw -A -m 1 -r 192.168.1.2 -p 3128

I tried this as well:
ipchains -A input -p tcp -s 192.168.1.0/24 80 -m 1
ipmasqadm mfw -A -m 1 -r 192.168.1.2 -p 3128

and this:
ipmasqadm portfw -a -P tcp -L 192.168.1.1 80 -R 192.168.1.2 3128
(i figured MAYBE since the packets were coming in from the inside interface that it might forward to the proxy server)

Any advice would be appreciated. Thanks again!

Last edited by dangel; 12-31-2001 at 01:37 PM.
 
Old 01-02-2002, 02:56 PM   #2
raven
Member
 
Registered: Dec 2001
Location: Basel, Switzerland
Distribution: ubuntu
Posts: 297

Rep: Reputation: 31
hello

port forwarding is much easier with iptables. the commands for it are for example

iptables -t nat -A PREROUTING -d dest_ip -p tcp --dport dest_port -j DNAT

the most important here as you might see, is the target speciefied by the -j switch which tells iptables to DESTINATION-NAT to some port.

hope this works.

if you need assistance in setting up a iptables firewall, an you understand german, you might visit

raven.eplay.ch

i wrote a pretty fine tutorial about how to set up an iptables firewall.

cya
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Squid - Connection refused on port 3128 Deep13 Linux - Software 12 12-02-2009 04:49 AM
A way to forward an IP/Port to another system's IP/Port astroboy5714 Linux - Networking 6 01-26-2004 06:45 PM
Disable port 3128 cyucuis Linux - Security 6 01-08-2004 03:51 PM
Failed to start squid because port 3128 is in use Frankd Linux - Software 0 10-14-2002 03:36 PM
Forward port port 80 to lan web server dulaus Linux - Networking 9 10-04-2002 04:45 AM

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

All times are GMT -5. The time now is 11:21 AM.

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