Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Help: Source based portforwarding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
aztech
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jul 2002
Posts: 130
Location: Stenungsund, Sweden

PostPosted: Mon Sep 12, 2011 1:22 pm    Post subject: [Solved] Help: Source based portforwarding Reply with quote

I need help, if possible, to setup portforwarding/redirecting based on source-IP.

The proxy at work, has as far as I know, only port 80 and 443 open.
They closed port 8080 last week, so I can't use that anymore =(

Any way, can I use portforwarding based on source address for this?

ie. redirect/forward to local port 22, if source address is my work IP.


Last edited by aztech on Tue Sep 13, 2011 6:37 am; edited 1 time in total
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Sep 12, 2011 4:32 pm    Post subject: Reply with quote

Code:
iptables -t nat -A PREROUTING -i $ext_if -s workIP/32 -p tcp --dport 80 -j REDIRECT --to-port 22
:?:
_________________
The End of the Internet!
Back to top
View user's profile Send private message
aztech
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jul 2002
Posts: 130
Location: Stenungsund, Sweden

PostPosted: Mon Sep 12, 2011 4:53 pm    Post subject: Reply with quote

thanks !
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Tue Sep 13, 2011 6:31 am    Post subject: Reply with quote

aztech wrote:
thanks !
solved?
_________________
The End of the Internet!
Back to top
View user's profile Send private message
aztech
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jul 2002
Posts: 130
Location: Stenungsund, Sweden

PostPosted: Tue Sep 13, 2011 6:37 am    Post subject: Reply with quote

truc wrote:
aztech wrote:
thanks !
solved?


Yes!

Didn't work at first, but i figured it had to do with the proxy it self.
It doesn't like that I use SSH over port 80. All i get from Putty is "bad request 400" or something.
So I changed to port 443 and it works ... for the moment.
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
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