You are not logged in.

#1 2006-11-21 17:06:31

mdv
Member
From: Poland
Registered: 2005-04-09
Posts: 145

tricky question

Hi,
I have a following problem. I need to make a connection with a server X which only accepts connections by proxy Y, and proxy Y is accepting connections from network Z. I have a couple of computers in network Z one is a server on archlinux. I would like to make a http connetcion from my laptop outside the Z network. Now I solve this by logging into the archlinux server (ssh) and I connect to X by proxy Y using elinks.

Please help,
mdv

Offline

#2 2006-11-22 07:30:11

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tricky question

A: set a computer in network Z as a router from outside of Z to inside of Z. Use it as gateway for submask of network Z for the computers that are outside of network Z.

B: create a VPN

Offline

#3 2006-11-22 11:45:49

mdv
Member
From: Poland
Registered: 2005-04-09
Posts: 145

Re: tricky question

Can you suggest what king of rules should I use in my iptables to route the connection? Or a document I should read?

Offline

#4 2006-11-22 15:52:10

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tricky question

# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE

# Assuming one NIC to local LAN
iptables --append FORWARD --in-interface eth0 -j ACCEPT

# Enables packet forwarding by kernel
echo 1 > /proc/sys/net/ipv4/ip_forward

This is all I know about iptables. Look for further help if you need to.

Offline

#5 2006-11-22 16:00:35

mdv
Member
From: Poland
Registered: 2005-04-09
Posts: 145

Re: tricky question

I was looking for a solution which would work in a way that a port 8080 on my archlinux server would be transfering the connection to port 8080 of the proxy server. This way I would be able to set my archlinux server as a proxy in my Konqueror and use it as if it were the real proxy server which accepts connection only from the Z network.

Thanks anyway.
Best wishes, mdv.

Offline

#6 2006-11-22 20:09:44

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,958

Re: tricky question

Maybe this post from another thread will help :

brain0 wrote:

Guys, why don't you just search the arch wiki?

This howto has been started recently, it aims to describe all steps to set up a gateway:
http://wiki.archlinux.org/index.php/NAT … l_iptables
Basically, you need an internet connection, dnsmasq and an iptables setup. This howto uses shorewall, but I would prefer a pure iptables soluation, as described in this howto:
http://wiki.archlinux.org/index.php/Sim … wall_HOWTO

It's all there, waiting to be found  big_smile


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB