LinuxQuestions.org
Help answer threads with 0 replies.
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 04-25-2005, 04:11 AM   #1
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Rep: Reputation: 16
Access trhough firewall


Hallo, I have the common problem of corporate firewalls. I can use only 3 ports, 80, 443 and 22.

Where is the situation. I need to access a remote server at port 2082 (cPanel port) from my office. I do not have root access on the remote server.

Local PC (Linux box) =========>Firewall(80,443,22)-------->Internet

I would like to access the cPanel from my office PC, thus I suppose that I have to use ssh tunnels. Is that correct?
If so, do I need root access on the remote server? If so, is there any other alternative in order to finally access the remote server at the specific port?

Please note that I have root access on the local linux box.

Thanks for any help.
 
Old 04-25-2005, 04:34 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
maybe you could set-up a linux box (at your house, for example) to act as a NAT router and redirect traffic on one of the allowed ports to the server...

you could configure it with iptables so that all packets that arrive to it on port 80 (for example) get forwarded to port 2082 on the server...

Local PC ==> Firewall ==> NAT Box at Home ==> Internet Server

the main rules to do this on the NAT box would look something like this:
Code:
iptables -t nat -A PREROUTING -p TCP --dport 80 -s 100.100.100.100 \
-j DNAT --to-destination 200.200.200.200:2082
iptables -A FORWARD -p TCP --dport 2082 -d 200.200.200.200 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
in this example, 100.100.100.100 is the IP of the corporate firewall and 200.200.200.200 is the IP of the cPanel server...

this way you wouldn't need to change anything on the server or the PC, you simply try to connect to port 80 on the NAT box and you'll actually be connecting to port 2082 on the server...

anyways, it's just a thought...


Last edited by win32sux; 04-25-2005 at 04:39 AM.
 
Old 04-25-2005, 04:39 AM   #3
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
It looks quite nice (quick solution I can say), but I cannot use it! Ports 80, 443, 22, 25, 110 are closed from my provider (I know, I know but I will change ISP on a few months...). Thus, I have to find another solution.

Thanks anyway...
 
  


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
ssh trhough a router from outside DropSig Linux - Networking 1 07-04-2005 04:07 PM
Remote access behind firewall MicroSun Linux - Networking 7 02-23-2005 02:44 PM
Firewall Access P2P inescapeableus Linux - Networking 2 08-30-2004 12:41 AM
Can't access certain ftp's. Firewall. Stric-9 Linux - Security 7 04-03-2004 01:57 AM
Samba and firewall access Jim Miller Linux - Security 1 08-03-2003 07:34 PM

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

All times are GMT -5. The time now is 10:11 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