LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-25-2014, 02:24 AM   #1
MarkZar
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
Smile I've set up a hotspot in linux,how to forward the network traffic to a socks5 proxy?


I have a laptop with ubuntu-mate installed on it. I've set up a hotspot in linux for my kindle to use and it worked very well. Some important codes in my script are as follows:

Code:
sudo ifconfig wlan0 192.168.150.1/24 up
sudo sysctl net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo hostapd /etc/ap-hotspot.conf
Now I have a socks5 proxy on port 1090 in linux. The question is, how to let kindle use the proxy automatically when it connects to the hotspot? Please tell me how to do it in linux, because there's no way to set up a proxy in kindle per se.

Thank you.

Last edited by MarkZar; 12-25-2014 at 02:56 AM.
 
Old 12-26-2014, 06:15 AM   #2
jack_
Member
 
Registered: Oct 2012
Location: /
Distribution: Slackware, Debian, Ubuntu, CentOS, OpenSuse
Posts: 35

Rep: Reputation: Disabled
I suppose you could do something like:
Code:
iptables -t nat -A PREROUTING -s 192.168.150.0/24 -p tcp --dport 1090 -j DNAT --to-destination 127.0.0.1:1090

Last edited by jack_; 12-26-2014 at 06:20 AM.
 
  


Reply

Tags
iptables


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
Intercept and Forward TCP 443 Traffic to an HTTPS Proxy (using CONNECT) DDRRE Linux - Networking 11 10-12-2012 04:17 PM
LXer: Redirect all (TCP) traffic through transparent socks5 proxy in Linux LXer Syndicated Linux News 0 01-28-2012 06:10 PM
most common method to route network traffic using Linux as a router/proxy dave247 Linux - Networking 1 04-22-2011 03:51 PM
Forward port 80 for all traffic except to certain host/network fantasygoat Linux - Networking 3 12-04-2009 12:08 PM
How to set up forward SSL proxy Dawyea Linux - Networking 1 06-09-2004 05:09 AM

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

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