Gentoo Forums
Gentoo Forums
Quick Search: in
redirect - iptables [solved]
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ruivilela
Apprentice
Apprentice


Joined: 05 Oct 2004
Posts: 181
Location: Łódź

PostPosted: Sun Nov 25, 2007 3:05 pm    Post subject: redirect - iptables [solved] Reply with quote

Hi

I have been trying to solve this issue:

From my PC (home) I have a limited services to a external site that contains IP restrictions (also I can't connect without using full domain name)

I have access to a server (root + iptables) in my job that is able to use all services from that external site. So I was thinking to do a connection via my server

(not real IPs)
PC(Home): dynamic (anything)
myServer: 80.0.0.1
site: www.site.com (Domain name has to be suplied)

In my server i have apache running at 80, so I want to use port 5780 for example. when i connect to my server (only one interface) using such port with firefox I want a redirection to www.site.com:80.

Is it done by iptables, or I need some kind of proxy software like squid ?


Last edited by ruivilela on Sun Nov 25, 2007 5:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zhaozhou
n00b
n00b


Joined: 25 Oct 2007
Posts: 65

PostPosted: Sun Nov 25, 2007 3:25 pm    Post subject: Reply with quote

If you want the requests to be sent by the server you'll need some sort of proxy application, yes.
I dont know the capabilities of squid, so i can't give you an answer on that.
Back to top
View user's profile Send private message
SnEptUne
l33t
l33t


Joined: 22 Aug 2004
Posts: 637

PostPosted: Sun Nov 25, 2007 3:31 pm    Post subject: Reply with quote

It depends on what you are trying to do. If you want to setup a permanent redirect link with apache, you can use mod_rewrite. If you want to cache the content of other websites on your server with clients (home PC) connected to it, you can use squid. If you just want to overcome service limitation on your home PC, you can set up SSH tunnel or other kind of tunnel (such as VPN).

Proxy is probably the simplest route. I personally use privoxy instead of squid because I want javascript and ads filtering.
_________________
"There will be more joy in heaven over the tear-bathed face of a repentant sinner than over the white robes of a hundred just men." (LM, 114)
Back to top
View user's profile Send private message
ruivilela
Apprentice
Apprentice


Joined: 05 Oct 2004
Posts: 181
Location: Łódź

PostPosted: Sun Nov 25, 2007 3:48 pm    Post subject: Reply with quote

uh,

I see proxy is the way to solve this. I will explain in other way.

In my home I can do "www.site.com" (can't use IP because domain name is required) in Firefox and I have a site with limited application level services.

But at my Job I have all this services, that i want. So I thinked in using the server at the job as a "gateway", I can't use ssh/links/lynx for this because the page is not compatible. So I want to use my server as i would be in an internal network (but i'm not).
Back to top
View user's profile Send private message
SnEptUne
l33t
l33t


Joined: 22 Aug 2004
Posts: 637

PostPosted: Sun Nov 25, 2007 4:00 pm    Post subject: Reply with quote

Well, web proxies are for web browsing. If you want to access other services beside browsing web page (HTTP/HTTPS), you probably want to use dynamic SSH tunnels (dynamic port forwarding like SOCKS5 proxy).

You could refer to this link for more information.
http://forums.macosxhints.com/archive/index.php/t-66411.html
_________________
"There will be more joy in heaven over the tear-bathed face of a repentant sinner than over the white robes of a hundred just men." (LM, 114)
Back to top
View user's profile Send private message
Dagger
Developer
Developer


Joined: 11 Jun 2003
Posts: 673
Location: UK

PostPosted: Sun Nov 25, 2007 4:21 pm    Post subject: Reply with quote

if you want it only for www, that web proxy is the easiest way. If you want also other services I would consider VPN
_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
Back to top
View user's profile Send private message
ruivilela
Apprentice
Apprentice


Joined: 05 Oct 2004
Posts: 181
Location: Łódź

PostPosted: Sun Nov 25, 2007 5:40 pm    Post subject: Reply with quote

It's only for www. I didn't knew this "so" easy solution. Great

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum