Redirect all browser traffic to website x


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Redirect all browser traffic to website x
# 1  
Old 12-31-2012
Redirect all browser traffic to website x

Hello everyone,

I need to write a shell script, that redirects all traffic in your browser to a website x.
That means:

1. User sends a request to load website "www-somerandomwebsite-com"
2. the script redirects the request to a local file that is stored on the hard drive
3. User will always be redirected to website x


If someone could give me a hint on how to start with this script, I would be deeply thankful.
Thanks in advance.
# 2  
Old 12-31-2012
This is not something that you would normally try to do using a shell script. It would normally be done via a proxy or web caching server. Is there a reason you need to involve a shell script?
# 3  
Old 12-31-2012
well, the point is I am want to wrap the script with an app wrapper for OSX. That's basically the reason for using a shell script. I haven't yet looked into what else language it can wrap to make an app for me.

oh, isn't there a way to write it in a .conf file, something like:

127.0.0.1 www-random website x .com


btw thank you for your reply. Smilie
# 4  
Old 12-31-2012
Browsers talk direct to the O/S to get sockets and connections, so a wrapper script has no way to change that but by browser features it might trigger by configuring the browser. Some firewall products might also be able to redirect specific connections to other ports, like NAT, but that would be for the whole host at least.
# 5  
Old 12-31-2012
I am trying to use ipfw firewall and setting up a rule list now. I forgot to mention that it should run on OSX machines. Does anyone has experience with that?
# 6  
Old 12-31-2012
You might want one of these interfaces: ipfirewall - Wikipedia, the free encyclopedia
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Cybersecurity

DNS traffic

Hi All, I have just started learning Lunix; I hope you can help me to block unwanted DNS traffic. I have big spikes of traffic few times a day. The duration is from few minutes to two hours. Incoming traffic is 1 mbps, outgoing is 3mbps Using my friend's script I was able to get some... (1 Reply)
Discussion started by: OlegE
1 Replies

2. UNIX for Advanced & Expert Users

redirect http traffic

hi, i have freebsd gateway with ipfw as router. Recently i have setup squid-3.1.10 caching server for my lan. I want to redirect http,https traffic from gateway to linux squid box. below is my setup rl0--->xxx.xxx.xxx.xxx (connected to ISP) rl1 -->192.168.1.0/24 (my lan)... (1 Reply)
Discussion started by: goog
1 Replies

3. Linux

IP Traffic forwarding

Hello All I have the following setup of a network. Client machines sends requests to the server which is (192.168.1.50) running on Ubuntu server 8.04. And this server forwards all incoming traffic from clients to another server (192.168.1.100) when it's available. The availability is checked... (0 Replies)
Discussion started by: Anuradhai4i
0 Replies

4. Infrastructure Monitoring

Network Traffic

Hi all, Got a strange one here, well not so much strange, different :-) I need to work out if a server is particulary chatty, whether its talking / communicating heavily to a particular server, as Im planning to physically move the server to a different server, over a link. Hence the... (6 Replies)
Discussion started by: sbk1972
6 Replies

5. UNIX for Dummies Questions & Answers

multiple website traffic analyzer

Hello everybody, I'm hosting several websites on the same server using apache virtual hosting: ~$ tail /etc/apache2/sites-available/default <VirtualHost *> ServerName website1.mydomain.com DocumentRoot /var/www/website1 </VirtualHost> <VirtualHost *> ServerName... (5 Replies)
Discussion started by: chebarbudo
5 Replies

6. Solaris

ssh traffic

i have 3 servers running at home. i always connect to these servers from a windows box via ssh. recently i was snooping my interface on my database server and saw a lot of ssh traffic. this is a few lines of the snoop: deathstar -> xstar TCP D=22 S=3190 Ack=662538517 Seq=1676539194... (2 Replies)
Discussion started by: pupp
2 Replies

7. HP-UX

NIC traffic

hi, there, are there any ways to monitor the NIC traffic on HP-UX, tools or system call? thanks. (2 Replies)
Discussion started by: Frank2004
2 Replies

8. Programming

Redirect Browser

Hello guys, Is it possible to redirect browser to another socket address? Cheers, Elton (1 Reply)
Discussion started by: EltonSky
1 Replies

9. UNIX for Advanced & Expert Users

Traffic Shaping

I'm using FreeBSD because I like how easy the system can be set up, how software can be installed/removed and ... many other reasons:-) But there is a thing I don't know how to deal with: I have few connections behind a machine and I want to give to the machines behind a minimum guaranteed... (2 Replies)
Discussion started by: eNTer
2 Replies
Login or Register to Ask a Question