View previous topic :: View next topic |
Author |
Message |
cowboy0629 Tux's lil' helper
Joined: 11 May 2016 Posts: 105 Location: Kawartha Lakes, Ontario
|
Posted: Wed Jun 22, 2016 6:22 pm Post subject: Networking Problems & PPPOE |
|
|
Hi All I am having a networking issue I am having problems with.. I have setup Apache
I can get use the Apache Server Local but I can't hit it from the outside world...
Here is how my network is setup
https://www.dropbox.com/s/vpau9zkavxe8dmq/MIKES-NET.jpg?dl=0
I installed Apache on my gateway/router machine does anyone know how I can get my web server to the outside world?
I will post my IPTABLES when I get home tonight...
I really think I need to get my PPOE working to have my gateway/firewall do the logon to Bell and obtain the outside address. but for some reason I can not get PPOE to work.. I am going to attempt this again tonight
if anybody know what I may be doing wrong with the PPOE it would be a great help.. as Well.. maybe again it is my IPTABLES causeing problems
my IPTABLES
Code: |
#!/bin/bash
#
# May 19 2016
#
### This *has* to be loaded, or no NAT!!!
modprobe ipt_MASQUERADE
#WAN (eth0=enp0s25) --> Outside Network
export WAN="enp0s25"
#export WAN="ppp0"
#LAN (eth1=enp17s0) --> Inside Network
export LAN="enp17s0"
#Flush current rules
iptables -F
iptables -t nat -F
iptables -X
#Setup default policies to handle unmatched traffic
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
#Locks Services so they only work from the LAN
iptables -I INPUT 1 -i ${LAN} -j ACCEPT
iptables -I INPUT 1 -i lo -j ACCEPT
iptables -A INPUT -p UDP --dport bootps ! -i ${LAN} -j REJECT
iptables -A INPUT -p UDP --dport domain ! -i ${LAN} -j REJECT
#Allow access to the ssh server from the WAN
iptables -A INPUT -p TCP --dport ssh -i ${WAN} -j ACCEPT
#Drop TCP/UDP packets to privleged Ports:
iptables -A INPUT -p TCP ! -i ${LAN} -d 0/0 --dport 0:1023 -j DROP
iptables -A INPUT -p UDP ! -i ${LAN} -d 0/0 --dport 0:1023 -j DROP
#Add NAT Rules
iptables -I FORWARD -i ${LAN} -d 192.168.0.0/255.255.255.0 -j DROP
iptables -A FORWARD -i ${LAN} -s 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -A FORWARD -i ${WAN} -d 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -t nat -A POSTROUTING -o ${WAN} -j MASQUERADE
#Port Forwarding
# (Forward Outside to GW2)
iptables -t nat -A PREROUTING -p tcp --dport 28 -i ${WAN} -j DNAT --to 192.168.0.101
#iptables -t nat -A PREROUTING -p tcp --dport 80 -i ${WAN} -j DNAT --to 192.168.0.121
#Xbox Live (Rules for my XboxOne and Xbox360)
iptables -t nat -A PREROUTING -p udp --dport 88 -i ${WAN} -j DNAT --to 192.168.0.102
iptables -t nat -A PREROUTING -p tcp --dport 3074 -i ${WAN} -j DNAT --to 192.168.0.102
iptables -t nat -A PREROUTING -p udp --dport 3074 -i ${WAN} -j DNAT --to 192.168.0.102
#iptables -t nat -A PREROUTING -p tcp --dport 53 -i ${WAN} -j DNAT --to 192.168.0.102
#iptables -t nat -A PREROUTING -p udp --dport 53 -i ${WAN} -j DNAT --to 192.168.0.102
#iptables -t nat -A PREROUTING -p tcp --dport 80 -i ${WAN} -j DNAT --to 192.168.0.102
#iptables -t nat -A PREROUTING -p udp --dport 500 -i ${WAN} -j DNAT --to 192.168.0.102
iptables -t nat -A PREROUTING -p udp --dport 3544 -i ${WAN} -j DNAT --to 192.168.0.102
iptables -t nat -A PREROUTING -p udp --dport 4500 -i ${WAN} -j DNAT --to 192.168.0.102
## TELL KERNEL IT IS OK TO FORWARD PACKETS
echo 1 > /proc/sys/net/ipv4/ip_forward
for f in /proc/sys/net/ipv4/conf/*/rp_filter ; do echo 1 > $f ; done
#Instruct the IPtables daemon to save the changes to the rules
### THESE are the rules. You can save them if you want, but every time you alter these rules,
### or change interfaces, you will have to save them again.
/etc/init.d/iptables save
|
Last edited by cowboy0629 on Thu Jun 23, 2016 1:36 am; edited 1 time in total |
|
Back to top |
|
|
cowboy0629 Tux's lil' helper
Joined: 11 May 2016 Posts: 105 Location: Kawartha Lakes, Ontario
|
Posted: Thu Jun 23, 2016 1:33 am Post subject: Pppoe working but can only surf search engines |
|
|
Hello All.. I got PPP0E Working tonight.. but have ran into a problem...
I can get all over Local Network but I can not surf the internet...
I can go to google and yahoo etc.. basically any of the Search Engines and I can Search.. but I can't go to any of the links (server not found)
I can't go to any other website such as gentoo.org kijiji.ca amazon.ca amazon.com (server not found)
This Happens only on my internal network and wireless...
my Gateway Machine can go anywhere it wants on the internet coneccted PPP0E |
|
Back to top |
|
|
|
|
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
|
|