how to simulate only the redirect part of hotspot
i want to know if is possible, to simulation the little part of hotspot the redirect any http request to the login page, i want it to redirect to my local server apache.Anything user try to acess on web browser instead of return 404 page it send to my local server.( ill not be coonect to internet). lets say you type youtube.com, as im not connect to internet, it will not find the adress and will return 404, but instead i want it to send the request to my apache server.Or a way to the router transform all domains to my local ip(apache server).
networking router hotspot
add a comment |
i want to know if is possible, to simulation the little part of hotspot the redirect any http request to the login page, i want it to redirect to my local server apache.Anything user try to acess on web browser instead of return 404 page it send to my local server.( ill not be coonect to internet). lets say you type youtube.com, as im not connect to internet, it will not find the adress and will return 404, but instead i want it to send the request to my apache server.Or a way to the router transform all domains to my local ip(apache server).
networking router hotspot
add a comment |
i want to know if is possible, to simulation the little part of hotspot the redirect any http request to the login page, i want it to redirect to my local server apache.Anything user try to acess on web browser instead of return 404 page it send to my local server.( ill not be coonect to internet). lets say you type youtube.com, as im not connect to internet, it will not find the adress and will return 404, but instead i want it to send the request to my apache server.Or a way to the router transform all domains to my local ip(apache server).
networking router hotspot
i want to know if is possible, to simulation the little part of hotspot the redirect any http request to the login page, i want it to redirect to my local server apache.Anything user try to acess on web browser instead of return 404 page it send to my local server.( ill not be coonect to internet). lets say you type youtube.com, as im not connect to internet, it will not find the adress and will return 404, but instead i want it to send the request to my apache server.Or a way to the router transform all domains to my local ip(apache server).
networking router hotspot
networking router hotspot
edited Jan 15 at 14:29
David Andrade
asked Jan 15 at 13:32
David AndradeDavid Andrade
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You could use "ip route" to redirect traffic from ip A (192.X.X.X) to the interface that's connected to your apache server (eth0):
ip route add 192.X.X.X dev eth0
or you could use "iptables" to redirect traffic from interface A (eth0) to interface B (eth0):
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
PS: I'm assuming you are using linux.
im using windows, but i want to know if its possible to do on the router instead of my pc. the hotspot does it, but i want to know the name of the redirect it does before authentificating the user. i will provide content for people that cant afford internet,ill put my on website as portal, but when people connect to the network, they got be redirect to my server, or they just going to get page 404 or i got give them the ip to connect, should be a option on router =(. i need a name for that function so i can research more about it and make it work.
– David Andrade
Jan 15 at 15:45
@DavidAndrade It's called "Captive Portal", you can redirect all traffic sending an HTTP Redirect (HTTP 302) or you can force all unauthenticated users to use your DNS that permits access only to your captive page. Keep in mind that you can't use your consumer grade router. The best way would be to use a Raspberry Pi and redirect all the traffic using that, by doing so you would have perfect control over your network.
– Jes7err
Jan 15 at 16:03
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394520%2fhow-to-simulate-only-the-redirect-part-of-hotspot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could use "ip route" to redirect traffic from ip A (192.X.X.X) to the interface that's connected to your apache server (eth0):
ip route add 192.X.X.X dev eth0
or you could use "iptables" to redirect traffic from interface A (eth0) to interface B (eth0):
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
PS: I'm assuming you are using linux.
im using windows, but i want to know if its possible to do on the router instead of my pc. the hotspot does it, but i want to know the name of the redirect it does before authentificating the user. i will provide content for people that cant afford internet,ill put my on website as portal, but when people connect to the network, they got be redirect to my server, or they just going to get page 404 or i got give them the ip to connect, should be a option on router =(. i need a name for that function so i can research more about it and make it work.
– David Andrade
Jan 15 at 15:45
@DavidAndrade It's called "Captive Portal", you can redirect all traffic sending an HTTP Redirect (HTTP 302) or you can force all unauthenticated users to use your DNS that permits access only to your captive page. Keep in mind that you can't use your consumer grade router. The best way would be to use a Raspberry Pi and redirect all the traffic using that, by doing so you would have perfect control over your network.
– Jes7err
Jan 15 at 16:03
add a comment |
You could use "ip route" to redirect traffic from ip A (192.X.X.X) to the interface that's connected to your apache server (eth0):
ip route add 192.X.X.X dev eth0
or you could use "iptables" to redirect traffic from interface A (eth0) to interface B (eth0):
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
PS: I'm assuming you are using linux.
im using windows, but i want to know if its possible to do on the router instead of my pc. the hotspot does it, but i want to know the name of the redirect it does before authentificating the user. i will provide content for people that cant afford internet,ill put my on website as portal, but when people connect to the network, they got be redirect to my server, or they just going to get page 404 or i got give them the ip to connect, should be a option on router =(. i need a name for that function so i can research more about it and make it work.
– David Andrade
Jan 15 at 15:45
@DavidAndrade It's called "Captive Portal", you can redirect all traffic sending an HTTP Redirect (HTTP 302) or you can force all unauthenticated users to use your DNS that permits access only to your captive page. Keep in mind that you can't use your consumer grade router. The best way would be to use a Raspberry Pi and redirect all the traffic using that, by doing so you would have perfect control over your network.
– Jes7err
Jan 15 at 16:03
add a comment |
You could use "ip route" to redirect traffic from ip A (192.X.X.X) to the interface that's connected to your apache server (eth0):
ip route add 192.X.X.X dev eth0
or you could use "iptables" to redirect traffic from interface A (eth0) to interface B (eth0):
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
PS: I'm assuming you are using linux.
You could use "ip route" to redirect traffic from ip A (192.X.X.X) to the interface that's connected to your apache server (eth0):
ip route add 192.X.X.X dev eth0
or you could use "iptables" to redirect traffic from interface A (eth0) to interface B (eth0):
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
PS: I'm assuming you are using linux.
answered Jan 15 at 15:02
Jes7errJes7err
62
62
im using windows, but i want to know if its possible to do on the router instead of my pc. the hotspot does it, but i want to know the name of the redirect it does before authentificating the user. i will provide content for people that cant afford internet,ill put my on website as portal, but when people connect to the network, they got be redirect to my server, or they just going to get page 404 or i got give them the ip to connect, should be a option on router =(. i need a name for that function so i can research more about it and make it work.
– David Andrade
Jan 15 at 15:45
@DavidAndrade It's called "Captive Portal", you can redirect all traffic sending an HTTP Redirect (HTTP 302) or you can force all unauthenticated users to use your DNS that permits access only to your captive page. Keep in mind that you can't use your consumer grade router. The best way would be to use a Raspberry Pi and redirect all the traffic using that, by doing so you would have perfect control over your network.
– Jes7err
Jan 15 at 16:03
add a comment |
im using windows, but i want to know if its possible to do on the router instead of my pc. the hotspot does it, but i want to know the name of the redirect it does before authentificating the user. i will provide content for people that cant afford internet,ill put my on website as portal, but when people connect to the network, they got be redirect to my server, or they just going to get page 404 or i got give them the ip to connect, should be a option on router =(. i need a name for that function so i can research more about it and make it work.
– David Andrade
Jan 15 at 15:45
@DavidAndrade It's called "Captive Portal", you can redirect all traffic sending an HTTP Redirect (HTTP 302) or you can force all unauthenticated users to use your DNS that permits access only to your captive page. Keep in mind that you can't use your consumer grade router. The best way would be to use a Raspberry Pi and redirect all the traffic using that, by doing so you would have perfect control over your network.
– Jes7err
Jan 15 at 16:03
im using windows, but i want to know if its possible to do on the router instead of my pc. the hotspot does it, but i want to know the name of the redirect it does before authentificating the user. i will provide content for people that cant afford internet,ill put my on website as portal, but when people connect to the network, they got be redirect to my server, or they just going to get page 404 or i got give them the ip to connect, should be a option on router =(. i need a name for that function so i can research more about it and make it work.
– David Andrade
Jan 15 at 15:45
im using windows, but i want to know if its possible to do on the router instead of my pc. the hotspot does it, but i want to know the name of the redirect it does before authentificating the user. i will provide content for people that cant afford internet,ill put my on website as portal, but when people connect to the network, they got be redirect to my server, or they just going to get page 404 or i got give them the ip to connect, should be a option on router =(. i need a name for that function so i can research more about it and make it work.
– David Andrade
Jan 15 at 15:45
@DavidAndrade It's called "Captive Portal", you can redirect all traffic sending an HTTP Redirect (HTTP 302) or you can force all unauthenticated users to use your DNS that permits access only to your captive page. Keep in mind that you can't use your consumer grade router. The best way would be to use a Raspberry Pi and redirect all the traffic using that, by doing so you would have perfect control over your network.
– Jes7err
Jan 15 at 16:03
@DavidAndrade It's called "Captive Portal", you can redirect all traffic sending an HTTP Redirect (HTTP 302) or you can force all unauthenticated users to use your DNS that permits access only to your captive page. Keep in mind that you can't use your consumer grade router. The best way would be to use a Raspberry Pi and redirect all the traffic using that, by doing so you would have perfect control over your network.
– Jes7err
Jan 15 at 16:03
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394520%2fhow-to-simulate-only-the-redirect-part-of-hotspot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown