Redirect to router when i load a website on my directadmin server network - networking

I have a server in my office that connected to my ADSL router,
And I using this modem to my internet connection
My Server is HP DL380 With CentOs 7 + Directadmin
The modem is D-link DSL-2750U
When I loading my DirectAdmin websites, I redirected to the modem
what's wrong with this and why this has happened?
All Sites are good in the internet and no problem
I can see my websites only when I using a VPN
Thank you, guys!
i show it in image

I understand you are trying to connect to a server located on your network. Since this works with a VPN this would almost certainly be a routing problem.
A few 'traceroutes' from your CentOS server to your wifi device would tell you where the traffic is failing. Here are some common issues that cause your routing problem.
1) CentOs server contains a subnet that overlaps the wifi network or vice versa. This doesn't work since the CentOS server believes the device on the wifi is on the same subnet when it isn't.
2) Cent OS server contains a default route other than to the D-link router (unlikely)
If you can't ping the CentOs server from your wifi device and these are not the issues please provide a network diagram that includes IP addresses and subnets or the wifi network, Server network, and VPN network.

Related

How to access xampp from another pc via LAN?

I am running XAMPP on my windows 10. and installed WordPress site. All working fine on my pc and other PCs in my network.
I just changed my router.
My site is working on my PC but not working on other PCs.
When i connect with WiFi, its working. If i connect with cat5 wire, its not working.
Check your IP-Addresses and network configuration (e.g.: Gateway). Port Forwarding may also be needed on the new router.
For a better answer I'd need more details. For example, can you ping the other PCs on the network? Are you able to connect to the internet?
You should also check your firewall.

VPN server and client (possibly) on the same machine

What I'm trying to achieve is:
Connect to a VPN as client and route all my internal network's traffic over the VPN.
Run a VPN server, so that people from outside can connect to my internal network and get routed over the a.m. VPN client.
I'm trying to achieve that with a router running dd-wrt (netgear D6200), and / or a raspberry pi.
Can someone tell me if this can be achieved, and if, direct me to what would be a possible solution?
(I'm not looking for a tutorial, just a direction)
Thanks!
This thread probably does not belong here.
Consider using OpenWRT instead of dd-wrt. OpenWRT gives you a usable build system and easier to customize and build. I am not advocating OpenWRT. This can be a stop gap measure.
You can setup a OpenVPN server and OpenVPN client using the standard
documentation available on OpenWRT Wiki and also OpenVPN site.
Add to OpenVPN server.conf the following directive redirect-gateway def1. This will push the default gateway to clients connecting to OpenVPN server. Further, make sure you are using a unique network IP pool for VPN clients and does not clash with the remove VPN server.
Make sure you are masquerading the VPN traffic (Clients of local VPN server) before forwarding to remove VPN server. This can be tricky as this interface does not exist at boot time. It needs to be configured using up and down scripts
Make sure you are allowing traffic (clients of local VPN Server) on VPN interface to be forwarded in your firewall rules
Before setting up the OpenVPN server, make sure
The remove VPN server is pushing the default gateway to your VPN
client
You have setup the firewall correctly
You are able to reach the cloud through the Remote VPN Server. Checking with some site like www.whatismyip.com will help
Yes this is possible with dd-wrt on Netgear.
There is no need of Raspberry (unless you meant to run the remote VPN server on it).
Configure and run VPN server on dd-wrt - and try connectivity by connecting clients. Both tun/tap should work in general (with VPN client running). I tested with tun.
Configure and run VPN client on dd-wrt and try connecting to your VPN server. By default, the router should start directing all traffic (for its own LAN clients) via the VPN server.
So far so good.
The problem comes when you want dd-wrt's VPN clients (and not just LAN clients) to take the same route. With a VPN client running on dd-wrt, dd-wrt's own VPN clients will not be able to connect to the VPN server running on dd-wrt as such. To make it work, see below.
This is only possible via PBR - i.e. you run VPN client on dd-wrt, but take the router itself off this client, and route only specific clients through this VPN client running on dd-wrt.
With some tweaks using subnet masks, it is possible to include all your LAN and VPN IPs in the PBR policy so that everything (except the router itself) routes through the remote VPN server.
The key is to include dd-wrt's VPN clients' virtual IPs in the PBR. While configuring VPN server on dd-wrt, there is a field for specifying the clients' network and netmask.
If you use this network IP and netmask in client process's PBR policy, your (dd-wrt's) VPN clients will be able to connect to the VPN server running on dd-wrt, and will in turn be routed through the remote VPN server to which dd-wrt is connected as a client.

2Wire router port forwarding

I am having some trouble allowing my 2wire router (provided by AT&T to forward certain ports.
I have a raspberry pi running subsonic (a music server) and I would like to access it from the outside internet. I have configured the pi with a static LAN IP address and have opened the specified ports (4040 and 80) on both TCP and UDP. I have also confirmed the service is active and is listening on the specified ports via netstat.
When I attempt to connect, however, from my WAN IP I am confronted with a connection refused dialog. Checking the firewall logs on my router, I see this message
IN=br1 MAC=--:--:--:--:--:-- SRC=(my computer IP) DST=(My WAN IP) LEN=40 TTL=240 PROTO=TCP DPT=5060 Unknown inbound session stopped
It appears that my firewall is still blocking the external connection. What strikes me as odd is, although I am unable to connect I can still see that the port is open from an outside port scanner. Using the service provided from http://www.yougetsignal.com/tools/open-ports/ I have confirmed that my IP has port 4040 to be open.
Once again, I have confirmed that the service is indeed listening on the raspberry pi, setup a static LAN address and created the protocol for both TCP and UDP....
Any help on this matter would be greatly appreciated.
Thanks in advance!
Ok so for whatever reason it was working all along. Apparently it was just getting confused by me trying to connect to my own router. I confirmed this by connecting to the server via 4G on my phone.
Dumb mistake by me.

Open website via computer IP address while running tomcat locally with a router?

I'm working on a website for a friend, developing using Eclipse/Tomcat. I'm running it locally and trying to open it via my internet port IP address, but I can't get it to work. The computer I am running it from is connected to a router, so it is running off of 192.168.1.4, and http://192.168.1.4:8080/Mobile_Site/index.jsp works. However when I try and open it via my internet port IP, http://67.xxx.244.xx:8080/Mobile_Site/index.jsp it doesn't find it from any device, even outside my local network. Is there a way to send the link when running locally when connected to a router?
You have to configure your router port forwarding (or virtual servers depending on the router) to forward TCP connections from 67.xxx.244.xx:NNNN to 192.168.1.4:8080.
Then you give the 67.xxx.244.xx:NNNN address to your friend.
Note: NNNN at your router doesn't need to be 8080, as long as the port forwarding is set properly.

dnsmasq resolve DNS queries normally

I'm new to dnsmasq and networking isn't my strong point, hopefully i'm missing something simple.
I have a Ubuntu laptop running dnsmasq. The laptop's WiFi is connected to the Internet, the laptop's ethernet is connected to a LAN.
Plugging my machine into the LAN I am assigned an IP address by the laptop. Accessing www.google.com on my machine gets picked up the laptop and i'm served the laptops Apache page, which is my desired result. The problem is I can't access any other website, Destination Host Unreachable.
I'd like the laptop running dnsmasq to allow my machine to resolve DNS queries normally and only be restricted when accessing www.google.com.
My dnsmasq.conf is the default except:
address=/www.google.com/192.168.0.1
interface=eth0
dhcp-range=192.168.0.50,192.168.0.150,12h
I've a feeling it might be related to the IP settings on each network?
The WiFi has a static IP 192.168.1.55 taking to the router at 192.168.1.1 and the DNS server at 192.168.1.10.
The ethernet is configured manually with an IP 192.168.0.1 setting the router as the WiFi IP 192.168.1.55 and the same for the DNS server 192.168.1.55.
Thanks in advance for any help.
Pete
After a lot of fiddling, this was related to iptables and not dnsmasq.

Resources